Enhancing K-Nearest Neighbor Algorithm on Network Traffic Classification using Recursive Feature Elimination
DOI:
https://doi.org/10.21512/emacsjournal.v8i2.14277Keywords:
classification, network, traffic, k-nearest, feature selectionAbstract
Network traffic classification is a category in network traffic monitoring analysis that has a very important function in network management analysis. By identifying the type of traffic flowing through a network, administrators can allocate bandwidth more effectively, maintain service quality, and detect abnormal activity, which makes it a fundamental part of network monitoring. One of the ways to do it is by machine learning both unsupervised and supervised. This study implemented supervised machine learning, namely K-Nearest Neighbor to network traffic dataset with two different schemas, with and without feature selection. These two schemas are compared directly so that any difference in results can be attributed to the feature selection process. It aims to clarify the impact of Recursive Feature Elimination to network traffic classification using K-Nearest Neighbor Algorithm. It classifies data with features to 17 target classes. Previous studies state that the use of feature selection in some techniques can improve its accuracy. Recursive Feature Elimination is chosen and result that the accuracy is increased from 0.66 to 0.76. Another thing that this study shows is that there is no pattern where the more data points from a class will result in better classification performance in that class. In other words, the number of samples available for a class does not guarantee that the class will be classified more accurately. This research clarifies that feature selection can improve classification performance. Selecting the most relevant features also reduces the amount of irrelevant information the algorithm must process, which makes the classification more efficient and reliable,
References
A. Awais and Z. Iqbal. (2022). Network Traffic Classification through Machine Learning methods in IoT Networks. International Conference on IT and Industrial Technologies (ICIT), Chiniot, Pakistan, 2022, pp. 01-06, doi: 10.1109/ICIT56493.2022.9989079
Afifaturahman, A. D., Maulana, F., & Artikel, S. (2021). Perbandingan Algoritma K-Nearest Neighbour (KNN) dan Naive Bayes pada Intrusion Detection System (IDS) INFORMASI ARTIKEL ABSTRACT. INNOVATION IN RESEARCH OF INFORMATICS, 3(1), 17–25. http://innovatics.unsil.ac.id
Azab, A., Khasawneh, M., Alrabaee, S., Choo, K. K. R., & Sarsour, M. (2024). Network traffic classification: Techniques, datasets, and challenges. In Digital Communications and Networks (Vol. 10, Issue 3, pp. 676–692). KeAi Communications Co. https://doi.org/10.1016/j.dcan.2022.09.009
Bahl, A., Hellack, B., Balas, M., Dinischiotu, A., Wiemann, M., Brinkmann, J., Luch, A., Renard, B. Y., & Haase, A. (2019). Recursive feature elimination in random forest classification supports nanomaterial grouping. NanoImpact, 15. https://doi.org/10.1016/j.impact.2019.100179
Cheng, X. (2024). Signals and Systems Ins. In Comput. Signal Syst (Vol. 1, Issue 1). https://soapubs.com/index.php/ICSS
D’Alconzo, A., Drago, I., Morichetta, A., Mellia, M., & Casas, P. (2020). A Survey on Big Data for Network Traffic Monitoring and Analysis. https://doi.org/10.1109/TNSM.2019.2933358
F. Alam, R. Kashef and M. Jaseemuddin. (2021). Enhancing The Performance of Network Traffic Classification Methods Using Efficient Feature Selection Models. IEEE International Systems Conference (SysCon), Vancouver, BC, Canada, 2021, pp. 1-6, doi: 10.1109/SysCon48628.2021.9447076.
Halder, R. K., Uddin, M. N., Uddin, M. A., Aryal, S., & Khraisat, A. (2024). Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications. Journal of Big Data, 11(1). https://doi.org/10.1186/s40537-024-00973-y
M. Agarwal, K. S. Gill, R. Chauhan, A. Kapruwan and D. Banerjee. (2024). Classification of Network Security Attack using KNN (K-Nearest Neighbour) and Comparison of different Attacks through different Machine Learning Techniques. 3rd International Conference for Innovation in Technology (INOCON), Bangalore, India, pp. 1-7, doi: 10.1109/INOCON60754.2024.10512250.
Mahmood, M., Ahmad Khalil, S., Jamil Shah, S., & Ahmad, M. (2023). Network Traffic Classification Techniques and Comparative Evaluation of Machine Learning Models. In International Journal of Innovative Science and Research Technology (Vol. 8, Issue 6). www.ijisrt.com
Napa, K. K., Kumar, A. K., Murugan, S., Mahammad, K., Assegie, T. A., & Okokpujie, K. (2024). Early prediction of chronic heart disease with recursive feature elimination and supervised learning techniques. IAES International Journal of Artificial Intelligence, 13(1), 730–736. https://doi.org/10.11591/ijai.v13.i1.pp730-736
Shafiq, Muhammad & Yu, Xiangzhan & Wang, Dawei. (2018). Network Traffic Classification Using Machine Learning Algorithms. 621-627. 10.1007/978-3-319-69096-4_87
Trang, K., & Nguyen, A. H. (2022). A Comparative Study of Machine Learning-based Approach for Network Traffic Classification. Knowledge Engineering and Data Science, 4(2), 128. https://doi.org/10.17977/um018v4i22021p128-137
Z. A. Hasan Tayyeh, R. Alubady, M. Molhem and M. Alsamman. (2024). Network Traffic Classification Using Machine Learning. 7th International Conference on Internet Applications, Protocols, and Services (NETAPPS), Kuala Lumpur, Malaysia, 2024, pp. 1-7, doi: 10.1109/NETAPPS63333.2024.1082342
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Andika Elok Amalia, Alwin Bahari, Luhur Bayuaji

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License - Share Alike that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.
USER RIGHTS
All articles published Open Access will be immediately and permanently free for everyone to read and download. We are continuously working with our author communities to select the best choice of license options, currently being defined for this journal as follows: Creative Commons Attribution-Share Alike (CC BY-SA)


