EFFECTIVENESS HYPERPARAMETER TUNING ON RANDOM FOREST, LINEAR DISCRIMINANT ANALYSIS, LOGISTIC REGRESSION AND NAÏVE BAYES ALGORITHMS FOR DETECTING DOS NETWORK ATTACKS
Abstract
Denial of Service (DoS) attacks are a major threat to network security, characterized by overwhelming system resources with illegitimate requests. Such attacks can disrupt critical services and cause substantial financial losses. However, there is still a need for a more efficient model to detect DoS attack with high accuracy. The aim of this research is to determine the impact of hyperparameter tuning on the four algorithms to identify the best algorithm for detecting DoS network attacks. The research method involves data preprocessing, feature selection, encoding, balancing using SMOTE (Synthetic Minority Over-Sampling Techinuque) and evaluation using confusion matrix. This research use the NSL-KDD dataset because it is relevant for DoS attack detection and flexible for testing various classification algorithms and utilizing hyperparameter tuning. This study evaluates the effectiveness hyperparameter tuning on several machine learning alghorithms namely Random Forest, Linear Discriminant Analysis (LDA), Logistic Regression and Naïve Bayes in detecting DoS attacks. Results indicate that Random Forest achieves highest accuracy (99,97%) and robust performance across all metrics, demonstrating superior generalization and precision. LDA, Logistic Regression and Naïve Bayes also performed well but fell short of Random Forest in handling complex patterns in the dataset. The utilization of hyperparameter tuning can improve the accuracy, consistency and efficiency of the algorithm so as to optimize the combination of various parameters in detecting DoS attacks. The findings provide valuable insights into selecting suitable algorithms for future implementations in cybersecurity systems.
Downloads
References
A. A. Ojugo and R. E. Yoro, “Forging a deep learning neural network intrusion detection framework to curb the distributed denial of service attack,” Int. J. Electr. Comput. Eng., vol. 11, no. 2, pp. 1498–1509, 2021, doi: 10.11591/ijece.v11i2.pp1498-1509.
P. Radhakrishnan et al., “DoS attack detection and hill climbing based optimal forwarder selection,” Indones. J. Electr. Eng. Comput. Sci., vol. 36, no. 2, pp. 882–891, 2024, doi: 10.11591/ijeecs.v36.i2.pp882-891.
L. Narayanan, S. .R, G. Julie, Y. Robinson, and V. Shanmuganathan, “Machine Learning Based Detection and a Novel EC-BRTT Algorithm Based Prevention of DoS Attacks in Wireless Sensor Networks,” Wirel. Pers. Commun., vol. 127, pp. 1–25, Feb. 2021, doi: 10.1007/s11277-021-08277-7.
M. Bogdanoski, T. Shuminoski, and A. Risteski, “Analysis of the SYN Flood DoS Attack,” Int. J. Comput. Netw. Inf. Secur., vol. 5, no. 8, pp. 15–11, 2013, doi: 10.5815/ijcnis.2013.08.01.
M. M. Rasheed, A. K. Faieq, and A. A. Hashim, “Development of a new system to detect denial of service attack using machine learning classification,” Indones. J. Electr. Eng. Comput. Sci., vol. 23, no. 2, pp. 1068–1072, 2021, doi: 10.11591/ijeecs.v23.i2.pp1068-1072.
N. Tripathi and B. Mehtre, “DoS and DDoS Attacks : Impact , Analysis and Countermeasures,” Adv. Comput. Netw. Secur., no. December 2013, pp. 1–6, 2014.
G. Kumar, “Denial of service attacks–an updated perspective,” Syst. Sci. Control Eng., vol. 4, no. 1, pp. 285–294, 2016, doi: 10.1080/21642583.2016.1241193.
R. B. Blaˇ, H. Kim, B. Rozovskii, and A. Tartakovsky, “A novel approach to detection of denial-of-service attacks via adaptive sequential and batch-sequential change-point detection methods,” Proc. IEEE …, no. June, pp. 1–7, 2001, [Online]. Available: http://www.professores.unirg.edu.br/marcelo/coordenacao/mar/doutorado/ufrj/DoSDectionPaper.pdf
O. Boyar, M. E. Özen, and B. Metin, “Detection of Denial-of-Service Attacks with SNMP/RMON,” INES 2018 - IEEE 22nd Int. Conf. Intell. Eng. Syst. Proc., no. March, pp. 000437–000440, 2018, doi: 10.1109/INES.2018.8523851.
Y. Xie, “Machine learning-based DDoS detection for IoT networks,” Appl. Comput. Eng., vol. 29, no. 1, pp. 99–107, 2023, doi: 10.54254/2755-2721/29/20230972.
S. Situmorang and Yahfizham, “Analisis Kinerja Algoritma Machine Learning Dalam Deteksi Anomali Jaringan,” J. Mat. dan Ilmu Pengetah. Alam, vol. 1, no. 4, pp. 258–269, 2023, [Online]. Available: https://doi.org/10.59581/konstanta.v1i4.1722
S. Wali, I. Khan, I. A. Khan, and S. Member, “Explainable AI and Random Forest Based Reliable Intrusion Detection system,” Authorea Prepr., pp. 1–9, 2023, [Online]. Available: https://www.authorea.com/doi/full/10.36227/techrxiv.17169080.v1?commit=efd2c0478c7643c3f5acbea1e1e16753d0a2c2e6
S. Wang et al., “Detecting flooding DDoS attacks in software defined networks using supervised learning techniques,” Eng. Sci. Technol. an Int. J., vol. 35, no. November, 2022, p. 101176, 2022, doi: 10.1016/j.jestch.2022.101176.
W. F. Urmi et al., “A stacked ensemble approach to detect cyber attacks based on feature selection techniques,” Int. J. Cogn. Comput. Eng., vol. 5, no. January, pp. 316–331, 2024, doi: 10.1016/j.ijcce.2024.07.005.
Y. Shang, “Prevention and detection of DDOS attack in virtual cloud computing environment using Naive Bayes algorithm of machine learning,” Meas. Sensors, vol. 31, no. July 2023, p. 100991, 2024, doi: 10.1016/j.measen.2023.100991.
D. R. Wijaya, N. F. Syarwan, M. A. Nugraha, D. Ananda, T. Fahrudin, and R. Handayani, “Seafood Quality Detection Using Electronic Nose and Machine Learning Algorithms With Hyperparameter Optimization,” IEEE Access, vol. 11, pp. 62484–62495, 2023, doi: 10.1109/ACCESS.2023.3286980.
A. Oyetoro, J. Mart, U. Amah, J. M. Orcid, and U. A. Orcid, “Using Machine Learning Techniques Random Forest and Neural Network to Detect Cyber Attacks,” Sci. Prepr., no. April 2023, 2023, doi: 10.14293/PR2199.000059.v1.
M. Sipper, “High Per Parameter: A Large-Scale Study of Hyperparameter Tuning for Machine Learning Algorithms,” Algorithms, vol. 15, no. 9, p. 315, 2022, doi: 10.3390/a15090315.
F. Arden and C. Safitri, “Hyperparameter Tuning Algorithm Comparison with Machine Learning Algorithms,” Int. Conf. Inf. Technol. Inf. Syst. Electr. Eng., no. Desember 2022, pp. 183–188, Dec. 2022, doi: 10.1109/ICITISEE57756.2022.10057630.
S. Simon, N. Kolyada, C. Akiki, M. Potthast, B. Stein, and N. Siegmund, “Exploring Hyperparameter Usage and Tuning in Machine Learning Research,” 2023 IEEE/ACM 2nd Int. Conf. AI Eng. – Softw. Eng. AI, pp. 68–79, May 2023, doi: 10.1109/CAIN58948.2023.00016.
A. A. Salih and M. B. Abdulrazaq, “Cybernet Model: A New Deep Learning Model for Cyber DDoS Attacks Detection and Recognition,” Comput. Mater. Contin., vol. 78, no. 1, pp. 1275–1295, 2024, doi: 10.32604/cmc.2023.046101.
I. Zada et al., “Fine-Tuning Cyber Security Defenses: Evaluating Supervised Machine Learning Classifiers for Windows Malware Detection,” Comput. Mater. Contin., vol. 80, no. 2, pp. 2917–2939, 2024, doi: 10.32604/cmc.2024.052835.
M. Houichi, F. Jaidi, and A. Bouhoula, “Cyber Security within Smart Cities: A Comprehensive Study and a Novel Intrusion Detection-Based Approach,” Comput. Mater. Contin., vol. 81, no. 1, pp. 393–441, 2024, doi: 10.32604/cmc.2024.054007.
M. Vishwakarma and N. Kesswani, “A new two-phase intrusion detection system with Naïve Bayes machine learning for data classification and elliptic envelop method for anomaly detection,” Decis. Anal. J., vol. 7, no. April, p. 100233, 2023, doi: 10.1016/j.dajour.2023.100233.
T. Saranya, S. Sridevi, C. Deisy, T. D. Chung, and M. K. A. A. Khan, “Performance Analysis of Machine Learning Algorithms in Intrusion Detection System: A Review,” Procedia Comput. Sci., vol. 171, no. 2019, pp. 1251–1260, 2020, doi: 10.1016/j.procs.2020.04.133.
M. H. Zaib, “NSL-KDD.” Accessed: Sep. 10, 2024. [Online]. Available: https://www.kaggle.com/datasets/hassan06/nslkdd/data?select=KDDTest-21.arff
Asif, Bibi, Arif, and Mukheimer, “Mejora de la predicción de enfermedades cardíacas mediante técnicas de aprendizaje por conjuntos con optimización de hiperparámetros,” Algorithms, vol. 16, no. 6, pp. 1–17, 2023, doi: 10.3390/a16060308.
A. Lailiyah, V. R. S. Nastiti, E. D. Wahyuni, and C. S. K. Aditya, “Klasifikasi Tingkat Kemampuan Adaptasi Siswa dalam Pembelajaran Online Menggunakan Decision Tree,” Techno.Com, vol. 23, no. 1, pp. 11–19, 2024, doi: 10.62411/tc.v23i1.9739.
C. Starbuck, The Fundamentals of People Analytics With Applications in R. 2023. doi: 10.1007/978-3-031-28674-2.
M. A. R. Putra, T. Ahmad, and D. P. Hostiadi, “Analysis of Botnet Attack Communication Pattern Behavior on Computer Networks,” Int. J. Intell. Eng. Syst., vol. 15, no. 4, pp. 533–544, 2022, doi: 10.22266/ijies2022.0831.48.
R. Kaur and N. Gupta, Comprehending SMOTE Adaptations to Alleviate Imbalance in Intrusion Detection Systems. 2023. doi: 10.1109/ICESC57686.2023.10193257.
A. Tesfahun and L. Bhaskari, Intrusion Detection Using Random Forests Classifier with SMOTE and Feature Reduction. 2013. doi: 10.1109/CUBE.2013.31.
K. Swarnalatha, N. Narisetty, G. R. Kancherla, and B. Bobba, “Analyzing Resampling Techniques for Addressing the Class Imbalance in NIDS using SVM with Random Forest Feature Selection,” Int. J. Exp. Res. Rev., vol. 43, no. September 2024, pp. 42–55, 2024, doi: 10.52756/ijerr.2024.v43spl.004.
Y.-H. Seo, Jae-Hyun and Kim, “Machine Learning Approach to Optimize SMOTE Ratio in Class Imbalance Dataset for Intrusion Detection,” Comput. Intell. Neurosci., vol. 2018, no. November 2018, pp. 1–11, 2018, doi: 0.1155/2018/9704672.
P. Araujo et al., “Impact of Feature Selection Methods on the Classification of DDoS Attacks using XGBoost,” J. Commun. Inf. Syst., vol. 36, no. 1, pp. 200–214, 2021, doi: 10.14209/jcis.2021.22.
M. A. Hossain and M. S. Islam, “Enhancing DDoS attack detection with hybrid feature selection and ensemble-based classifier: A promising solution for robust cybersecurity,” Meas. Sensors, vol. 32, no. January, p. 101037, 2024, doi: 10.1016/j.measen.2024.101037.
K. L. Goh, A. Goto, and Y. Lu, “LGB-Stack: Stacked Generalization with LightGBM for Highly Accurate Predictions of Polymer Bandgap,” ACS Omega, vol. 7, no. 34, pp. 29787–29793, 2022, doi: 10.1021/acsomega.2c02554.
M. Purba et al., “Effect of Random Splitting and Cross Validation for Indonesian Opinion Mining using Machine Learning Approach,” Int. J. Adv. Comput. Sci. Appl., vol. 13, no. 9, pp. 145–151, 2022, doi: 10.14569/IJACSA.2022.0130917.
M. Riskiyadi, “Detecting future financial statement fraud using a machine learning model in Indonesia: a comparative study,” Asian Rev. Account., vol. 32, no. 3, pp. 394–422, 2024, doi: 10.1108/ARA-02-2023-0062.
J. Simm et al., “Splitting chemical structure data sets for federated privacy-preserving machine learning,” J. Cheminform., vol. 13, no. 1, pp. 1–14, 2021, doi: 10.1186/s13321-021-00576-2.
V. G. Prabhu, K. Taaffe, and R. Pirrallo, “A multi-layered LSTM for predicting physician stress during an ED shift,” Proc. 2020 IISE Annu. Conf., pp. 1223–1228, 2020.
M. Agus Syamsul Arifin, A. Anto Tri Susilo, A. Taqwa Martadinata, and B. Santoso, “KLIK: Kajian Ilmiah Informatika dan Komputer Deteksi Aktifitas Malware pada Internet of Things menggunakan Algoritma Decision Tree dan Random Forest,” Media Online), vol. 4, no. 6, pp. 3073–3079, 2024, doi: 10.30865/klik.v4i6.1903.
O. Adiputra and E. Setiawan, “Klasifikasi Malicious URL Menggunakan Algoritma Improved Random Forest dan Random Forest Berbasis Web,” J. Sains dan Inform., vol. 9, no. 1, pp. 8–14, 2023, doi: 10.22216/jsi.v9i1.1378.
M. Azhari, Z. Situmorang, and R. Rosnelly, “Perbandingan Akurasi, Recall, dan Presisi Klasifikasi pada Algoritma C4.5, Random Forest, SVM dan Naive Bayes,” J. Media Inform. Budidarma, vol. 5, no. 2, p. 640, 2021, doi: 10.30865/mib.v5i2.2937.
V. Vajrobol, B. B. Gupta, and A. Gaurav, “Mutual information based logistic regression for phishing URL detection,” Cyber Secur. Appl., vol. 2, no. January, p. 100044, 2024, doi: 10.1016/j.csa.2024.100044.
O. Mjahed, S. El Hadaj, E. M. El Guarmah, and S. Mjahed, “Improved Supervised and Unsupervised Metaheuristic-Based Approaches to Detect Intrusion in Various Datasets,” C. - Comput. Model. Eng. Sci., vol. 137, no. 1, pp. 265–298, 2023, doi: 10.32604/cmes.2023.027581.
A. Shafiq, A. B. Çolak, T. N. Sindhu, S. A. Lone, and T. A. Abushal, “Modeling and survival exploration of breast carcinoma: A statistical, maximum likelihood estimation, and artificial neural network perspective,” Artif. Intell. Life Sci., vol. 4, no. July, p. 100082, 2023, doi: 10.1016/j.ailsci.2023.100082.
Q. Ma, “Recent applications and perspectives of logistic regression modelling in healthcare,” Theor. Nat. Sci., vol. 36, no. 1, pp. 185–190, 2024, doi: 10.54254/2753-8818/36/20240614.
S. D. Permai and K. Herdianto, “Prediction of Health Insurance Claims Using Logistic Regression and XGBoost Methods,” Procedia Comput. Sci., vol. 227, pp. 1012–1019, 2023, doi: 10.1016/j.procs.2023.10.610.
R. Kumar, B. Goswami, S. Mhatre, and S. Agrawal, “Naive Bayes in Focus: A Thorough Examination of its Algorithmic Foundations and Use Cases,” Int. J. Innov. Sci. Res. Technol., no. June 2024, pp. 2078–2081, Jun. 2024, doi: 10.38124/ijisrt/IJISRT24MAY1438.
M. Schonlau, “The Naive Bayes Classifier,” in inbook, 2023, pp. 143–160. doi: 10.1007/978-3-031-33390-3_8.
A. K. M. A. Habib, M. K. Hasan, R. Hassan, S. Islam, R. Thakkar, and N. Vo, “Distributed denial-of-service attack detection for smart grid wide area measurement system: A hybrid machine learning technique,” Energy Reports, vol. 9, no. December 2022, pp. 638–646, 2023, doi: 10.1016/j.egyr.2023.05.087.
Y. N. Fuadah, M. A. Pramudito, and K. M. Lim, “An Optimal Approach for Heart Sound Classification Using Grid Search in Hyperparameter Optimization of Machine Learning,” Bioengineering, vol. 10, no. 1, p. 45, 2023, doi: 10.3390/bioengineering10010045.
Copyright (c) 2025 Inka Saputri, Primandani Arsi, Khairunnisak Nur Isnaini

This work is licensed under a Creative Commons Attribution 4.0 International License.