This research aims to classify malicious packet data and compare the performance of two algorithms, namely K-Nearest Neighbor (K-NN) and Decision Tree (DT). The UNSW-NB15 dataset used in this study has undergone preprocessing, feature selection, and data split stages. The preprocessing stage includes data transformation and selection of relevant features to detect malicious packets. Subsequently, experiments were conducted to test various values of K in K-NN and measure accuracy, recall, precision, and F1-Score. The results show that K-NN has an accuracy of 91.54%, while DT has 92.41%. The conclusion of this research indicates that the Decision Tree (DT) algorithm performs slightly better than K-Nearest Neighbor (K-NN) in detecting malicious packets. Therefore, in selecting an algorithm for network security detection, it is important to consider the specific needs and goals of the research as well as the characteristics of the data used.
Copyrights © 2024