In recent years, anomaly detection has more importance in networking domains. Machine learning is very effective in anomaly detection to improve accuracy in classification. To ensure automated and effective cyber threat detection, analysis of security logs from the dataset is required. Usage of the internet increases cyber-attacks and at present, the cyber security situation is pessimistic. Use of social media and networking has increased in daily life, nowadays all are learning and working by using the internet but on the other hand, it becomes serious security threats problem. Thus the development of the Intrusion Detection System (IDS) is essential to provide an extra level of security. Cyber threat is an important issue faced by all organizations. However, it has difficult to use machine learning algorithms for threat detection analysis, due to huge number of negative threats detection, especially in the case of large scale environments. In this paper, we surveyed clustering and classification of machine learning algorithms. Using machine learning algorithms cyber threats and false detection rates are reduced which increases the performance of the system.