# Optimal Partitioning of Unbalanced Datasets for BGP Anomaly Detection
## 6 Conclusions  
The OP-ELM framework proposed in this work significantly addresses the class imbalance for BGP anomaly detection by combining optimal partitioning with the Extreme Learning Machine and demonstrated the best accuracy for both the majority (98.81% accuracy for Class A) and minority (87.75% for Class C) class performances. Our GWO-based partitioning ensures that the model is able to suppress bias but maintain its real-time detection capabilities (0.0055 s), which is crucial for detecting critical but rare routing anomalies. While the training times were ever so slightly higher, the measure shows that it generalizes well (94.13% (96.81) mean balanced or weighted results and 94.52% accuracy results after 100 iterations), showing that it would be reliable for practical use. There are many potential avenues for future work, such as making the OP-ELM more computationally efficient and easier to understand; yet, the results obtained already clearly show that the OP-ELM constitutes an advancement for BGP security solutions based on machine learning, with a tradeoff between accuracy, speed, and adaptability that protects the infrastructure of the Internet.  
Although the proposed approach yields better detection accuracy, successfully managing the problematic aspect of class imbalance, its main drawback is the increased training time compared to the Random Forest and weighted ELM algorithms. This is because it has a two-step approach, including the optimal partitioning of the dataset in the first step and classification in the second step. Since Extreme Learning Machine (ELM) training has a very fast and single-step solution, the majority of the computational burden is due to GWO-based optimization. Future studies can also investigate the use of more computationally efficient hybrid versions of the GWO algorithm (e.g., GWO-PSO or GWO-DE) or other optimization algorithms (e.g., PSO, WOA). Moreover, the implementation of feature selection or dimensionality reduction techniques can further improve the computational efficiency while preserving or even improving the detection accuracy.  
On the classifier side, the ELM seems to be a very efficient classification method; however, it suffers from the randomness of input weights and biases, which sometimes leads to a poor performance and lack of suitable generalization. In the future, this can be improved by employing metaheuristic optimization algorithms (PSO, GWO, DE, etc.) to optimize these parameters, or we can use autoencoder-based pre-training to make better initializations. While they might only marginally slow down the training process, these approaches offer vital boosts to the accuracy of the detections, as well as to the robustness of the model overall.  
Conceptualization, R.D.V., P.K.K. and V.K.J.; methodology, R.D.V., P.K.K., M.W.P.M. and M.C.G.; software, R.D.V., P.K.K., M.W.P.M. and M.C.G.; validation, P.K., K.J., M.W.P.M. and V.T.; formal analysis, V.T.; investigation, P.K., V.K.J., M.W.P.M. and V.T.; resources, V.T.; data curation, R.D.V.; writing--original draft preparation, R.D.V., P.K.K., M.W.P.M. and V.K.J.; writing--review and editing, V.T.; visualization, V.T.; supervision, P.K.K., V.K.J. and M.C.G.; project administration, P.K.K., V.K.J., M.W.P.M. and M.C.G.; funding acquisition, V.T. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Not applicable.  
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.  
The authors declare no conflicts of interest.