Robust Anomaly Detection in Network Traffic Using Bagging with Majority Voting Ensemble - Sultan Ilham Seftiansyah, Muhammad; Chairunnas, Andi; Yanti, Yusma (Universitas Negeri Jakarta, 2025)
Anomaly detection in computer networks is a crucial aspect of ensuring system security and availability. One of the most common and disruptive threats is Distributed Denial of Service (DDoS) attacks, which can overload servers and compromise service continuity. Traditional Intrusion Detection Systems (IDS) often struggle to detect sophisticated and evolving attack patterns, leading to reduced detection performance. This research proposes the use of ensemble learning with Bagging and Majority Voting to enhance anomaly detection. The dataset used in this study was CIC-DDoS2019, consisting of 33,066 rows and 88 features, processed through data cleaning, label encoding, and normalization. Three base classifiers—Decision Tree, Random Forest, and XGBoost—were integrated using Bagging with Majority Voting. Experiments were conducted with different train-test split ratios of 70:30, 75:25, 80:20, and 90:10. The results showed that the 70:30 split achieved the best performance with an accuracy of 93.58%, an F1-score of 90.51%, and the fastest evaluation time of 142.86 seconds. Additional tests on spam and phishing datasets confirmed the robustness of the Bagging approach, achieving accuracy above 96%. These findings demonstrate that Bagging with Majority Voting can effectively improve IDS performance and provide a reliable solution for detecting various types of cyberattacks.