Performance Analysis of different Machine Learning Models for Intrusion Detection Systems


  • Salim Qadir Mohammed College of Engineering -Sulaimani Polytechnic University Sulaymaniyah, Iraq
  • Mohammed A. Hussein College of Engineering -Sulaimani Polytechnic University Sulaymaniyah, Iraq



In recent years, the world witnessed a rapid growth in attacks on the internet which resulted in deficiencies in networks performances. The growth was in both quantity and versatility of the attacks. To cope with this, new detection techniques are required especially the ones that use Artificial Intelligence techniques such as machine learning based intrusion detection and prevention systems. Many machine learning models are used to deal with intrusion detection and each has its own pros and cons and this is where this paper falls in, performance analysis of different Machine Learning Models for Intrusion Detection Systems based on supervised machine learning algorithms. Using Python Scikit-Learn library KNN, Support Vector Machine, Naïve Bayes, Decision Tree, Random Forest, Stochastic Gradient Descent, Gradient Boosting and Ada Boosting classifiers were designed. Performance-wise analysis using Confusion Matrix metric carried out and comparisons between the classifiers were a due. As a case study Information Gain, Pearson and F-test feature selection techniques were used and the obtained results compared to models that use all the features. One unique outcome is that the Random Forest classifier achieves the best performance with an accuracy of 99.96% and an error margin of 0.038%, which supersedes other classifiers. Using 80% reduction in features and parameters extraction from the packet header rather than the workload, a big performance advantage is achieved, especially in online environments.


Download data is not yet available.



• Salih, A. & Abdulazeez, A., 2021. Evaluation of Classification Algorithms for Intrusion Detection System. A Review. Journal of Soft Computing and Data Mining (JSCDM), 15 April, 2(1), pp. 31-40.

• Daniya, T., Kumar, K. S., Kumar, B. S. & Kolli, C. S., 2021. A Survey on Anomaly based Intrusion Detection System. ELSEVIER, 12 March.

• Kaur, G. & Kumar, D., 2020. Classification of Intrusion using Artificial Neural Network with GWO. International Journal of Engineering and Advanced Technology (IJEAT), April, 9(4), pp. 599-606.

• Gupta, A. R. b. & Agrawal, J., 2020. A Comprehensive Survey on Various Machine Learning Methods used for Intrusion Detection System. 9th IEEE International Conference on Communication Systems and Network Technologies, 16 June.pp. 282-289.

• Kaur & Gurbani, D. K., 2020. Classification of Intrusion using Artificial Neural Network with GWO. International Journal of Engineering and Advanced Technology (IJEAT), April .9(4).

• Ahmad, Z. et al., 2021. Network intrusion detection system: A systematic study of machine learning and deep learning approaches. Transactions on Emerging Telecommunications Technologies, 32(1).

• Li, G., Yan, Z., Fu, Y. & Chen, H., 2018. Data Fusion for Network Intrusion Detection: A Review. Security and Communication Networks.

• Anwar, S. et al., 2017. From Intrusion Detection to an Intrusion Response System: Fundamentals, Requirements, and Future Directions. Algorithms. MDPI algorithms, 10(2), p. 39.

• Azhagiri, M., Rajesh, D. A. & Karthik, D. S., 2015. Intrusion Detection and Prevention System: Technologies and Challenges. International Journal of Applied Engineering Research, 10(87).

• Agrawal, D. & Agrawal, C., 2020. A Review on Various Methods of Intrusion Detection System. Computer Engineering and Intelligent Systems, 31 January .11(1).

• Mahmood, D. Y. & Hussein, M. A., 2014. Feature based Unsupervised Intrusion Detection. International Journal of Computer, Electrical, Automation, Control and Information Engineering, 8(9), pp. 1515-1519.

• Almseidin, M., Alzubi, M., Kovacs, S. & Alkasassbeh, M., 2017. Evaluation of Machine Learning Algorithms for Intrusion Detection System. In 2017 IEEE 15th International Symposium on Intelligent Systems and Informatics (SISY). IEEE, September.

• K, R. V., R, V., KP, S. & Poornachandran, P., 2018. Evaluating Shallow and Deep Neural Networks for Network Intrusion Detection Systems in Cyber Security. In 2018 9th International conference on computing, communication and and networking technologies (ICCCNT). IEEE, July.pp. 1-6.

• Sandosh, S., Govindasamy, V. & Akila, G., 2020. Enhanced Intrusion Detection System via Agent Dlustering and Classification based on Outlier Detection. Peer-to-Peer Networking and Applications, 13(3), pp. 1038-1045.

• Meryem, A. & Ouahidi, B. E., 2020. Hybrid Intrusion Detection System using Machine Learning. Network Security, May, 2020(5), pp. 8-19.

• Mohan, L., Jain, S., Suyal, P. & Kumar, A., 2020. Data mining Classification Techniques for Intrusion Detection System. IEEE, 12th International Conference on Computational Intelligence and Communication Networks, 20 December.

• Abrar, I., Ayub, Z., Masoodi, F. & Bamhdi, A. M., 2020. A Machine Learning Approach for Intrusion Detection System on NSL-KDD Dataset. In 2020 International Conference on Smart Electronics and Communication (ICOSEC). IEEE, Septembe.pp. 919-924.

• Iman, A. N. & Ahmad, T., 2020. Improving Intrusion Detection System by Estimating Parameters of Random Forest in Boruta. In 2020 International Conference on Smart Technology and Applications (ICoSTA). IEEE, February.pp. 1-6.

• LIU, C., GU, Z. & WANG, J., 2021. A Hybrid Intrusion Detection System Based on Scalable K-Means+ Random Forest and Deep Learning. IEEE Access, May, Volume 9, pp. 75729-75740.

• SETH, S., CHAHAL, K. K. & SINGH, G., 2021. A Novel Ensemble Framework for an Intelligent Intrusion Detection System. IEEE Access, 29 September, Volume 9, pp. 138451-138466.

• BERTOLI, G. D. C. et al., 2021. An End-To-End Framework for Machine Learning-Based Network Intrusion Detection System. IEEE Access, 27 July, Volume 9, pp. 106790-106803.

• Al-Daweri, M. S., Ariffin, K. A. Z., Abdullah, S. & Senan, M. F. E. M., 2020. An Analysis of the KDD99 and UNSW-NB15 Datasets for the Intrusion Detection System. Symmetry, 12(10), p. 1666.

• Zhu, H., Liu, W., Sun, M. & Xin, Y., 2017. A Universal High-Performance Correlation Analysis Detection Model and Algorithm for Network Intrusion Detection System. Mathematical Problems in Engineering, 2017.

• Xin, Y. et al., 2018. Machine learning and deep learning methods for cybersecurity. IEEE Access, pp. 35365-35381.

• Zhang, B. et al., 2018. Network Intrusion Detection Method Based on PCA and Bayes Algorithm. Security and Communication Networks, Research Article, 17 October.

• Farhana, K. R. M. a. A. M., 2020. An intrusion detection system for packet and flow based networks using deep neural network approach. International Journal of Electrical & Computer Engineering (2088-8708), 10(5).

• O. D. A. J. Olamantanmi Mebawondua, J. O. M., O. A., 2020. Network Intrusion Detection System using Supervised Learning Paradigm. Elsevier, 24 July.

• Müller, A. C. & Guido, S., 2016. Introduction to Machine Learning with Python: A Guide for Data Scientists. First ed. s.l.:O’Reilly.

• Mukhopadhyay, S., 2018. Advanced Data Analytics using Python: with Machine Learning, Deep Learning and nlp Examples. Kolkata, West Bengal, India: Apress.

• Klosterman, S., 2021. Data Science Projects with Python. UK: Birmingham B3 2PB.



How to Cite

Qadir Mohammed, salim and A. Hussein, M. (2022) “Performance Analysis of different Machine Learning Models for Intrusion Detection Systems”, Journal of Engineering, 28(5), pp. 61–91. doi: 10.31026/j.eng.2022.05.05.