## 4 Results
Figure 9: Confusion matrix output of study with ANNs + ADASYN function. The overall accuracy of 0.97, combined with the high weighted and macro averages of 0.96 and 0.97, respectively, indicates that the model not only addresses class imbalance effectively but also sustains a high level of accuracy across all classes. These results underscore the model's capability to deliver balanced and reliable classification performance, making it a highly suitable approach for tasks that demand both precision and sensitivity, particularly in imbalanced datasets. Figure 11 illustrates the confusion matrix for the ANN model combined with the BorderlineSMOTE function, showcasing the model's classification performance across the four classes. The model demonstrates exceptional accuracy, particularly in the \"allow\" and \"reset-both\" classes, with a high number of correctly classified instances (6001 and 5867, respectively) and minimal misclassifications. The \"deny\" class also performs well, although there is a slight decrease in precision, as indicated by 384 instances being misclassified as \"reset-both\" and 160 as \"allow\". Notably, the \"drop\" class is perfectly classified, with all 2122 instances accurately identified. This confusion matrix highlights the model's robustness, especially in handling the \"allow\" and \"reset-both\" classes, and its effectiveness in maintaining high classification accuracy despite class imbalances. The minor misclassifications in the \"deny\" class suggest an area for potential improvement, but overall, the model exhibits outstanding performance, providing reliable predictions across all categories. These results underscore the efficacy of integrating ANNs with the BorderlineSMOTE function in enhancing the model's ability to accurately differentiate between various classes. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Class** & **Precision** & **Recall** & **F1-Score** & **Support** \\ \hline allow & 1.00 & 0.99 & 1.00 & 6048 \\ deny & 0.99 & 0.91 & 0.95 & 6049 \\ drop & 0.85 & 1.00 & 0.92 & 2122 \\ reset-both & 0.97 & 1.00 & 0.98 & 5896 \\ accuracy & & & 0.97 & 20,115 \\ weighted avg & 0.95 & 0.97 & 0.96 & 20,115 \\ macro avg & 0.97 & 0.97 & 0.97 & 20,115 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Numerical results of the experimental study with ANNs + BorderlineSMOTE function. Figure 11: Confusion matrix output of study with ANNs + BorderlineSMOTE function. Figure 12 displays the accuracy and loss graphs for both the training and validation phases in the ANN model enhanced with the BorderlineSMOTE function. The accuracy graph shows that both training and validation accuracy improve steadily, stabilizing around 97%, indicating that the model has achieved high generalization capability. The close alignment between the training and validation accuracy curves, with only minor fluctuations, suggests that the model is not overfitting and is performing consistently across both datasets. The loss graph further corroborates this observation, with both training and validation losses decreasing over time. The training loss stabilizes early, while the validation loss continues to fluctuate slightly, which is expected given the complexity of the data and the nature of the BorderlineSMOTE function. Despite a few spikes in the validation loss, the overall downward trend and the eventual convergence of the training and validation losses indicate that the model is effectively learning and generalizing. These results affirm that the ANN model, when combined with BorderlineSMOTE, not only handles class imbalances effectively but also maintains strong predictive performance with minimal overfitting, making it a robust choice for complex classification tasks. The real-time performance metrics in Table 8 reveal notable differences in latency and throughput among the various ANN models used for firewall packet classification.