Deteksi anomali pada trafik jaringan merupakan aspek penting dalam sistem keamanan siber untuk mengidentifikasi pola serangan secara akurat. Namun, pemilihan metode deteksi yang tepat dan konfigurasi parameter optimal masih menjadi tantangan karena karakteristik pola serangan yang beragam. Penelitian ini mengevaluasi dan membandingkan performa empat metode deteksi anomaly berbasis machine learning: Local Outlier Factor (LOF), Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Distance-Based, dan Isolation Forest, dengan mengoptimalkan performa melalui feature selection dan hyperparameter tuning. Feature selection diterapkan menggunakan Variance Threshold, Correlation Filter, dan Mutual Information pada dataset NSL-KDD, diikuti optimasi hyperparameter menggunakan Grid Search dan Random Search. Evaluasi performa menggunakan metrik precision, recall, F1-score, serta analisis kurva ROC dan Precision-Recall untuk mengukur kemampuan diskriminatif setiap model. Hasil menunjukkan hyperparameter tuning meningkatkan performa seluruh model secara signifikan, dengan Distance-Based method mencapai keseimbangan terbaik antara sensitivitas dan ketepatan deteksi, diikuti Isolation Forest yang menunjukkan performa kompetitif. LOF mengalami peningkatan substansial setelah optimasi, sedangkan DBSCAN menunjukkan performa terendah. Penelitian ini menyimpulkan bahwa Distance-Based method dan Isolation Forest merupakan pilihan optimal untuk deteksi anomali jaringan dengan kemampuan mempertahankan precision tinggi pada recall tinggi, efektif meminimalkan false positive dalam aplikasi keamanan siber. Abstract Anomaly detection in network traffic is an essential aspect of cybersecurity systems for accurately identifying attack patterns. However, selecting appropriate detection methods and optimal parameter configurations remains challenging due to the diverse characteristics of attack patterns. This study evaluates and compares the performance of four machine learning-based anomaly detection methods: Local Outlier Factor (LOF), Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Distance-Based, and Isolation Forest, by optimizing their performance through feature selection and hyperparameter tuning. Feature selection was applied using Variance Threshold, Correlation Filter, and Mutual Information on the NSL-KDD dataset, followed by hyperparameter optimization using Grid Search and Random Search. Performance evaluation used precision, recall, F1-score metrics, as well as ROC and Precision-Recall curve analysis to measure the discriminative capability of each model. The results show that hyperparameter tuning significantly improved the performance of all models, with the Distance-Based method achieving the best balance between sensitivity and detection accuracy, followed by Isolation Forest which demonstrated competitive performance. LOF showed substantial improvement after optimization, while DBSCAN exhibited the lowest performance. This study concludes that the Distance-Based method and Isolation Forest are optimal choices for network anomaly detection with the ability to maintain high precision at high recall, effectively minimizing false positives in cybersecurity applications.
Copyrights © 2026