## 4 Results and Discussion
### Performance Analysis
#### 4.1.8 Performance Metrics Comparisons: (Accuracy, Precision, Recall, and Delay)  
Precision is a metric that measures the accuracy of a model's positive predictions, as shown in Figure 8b. It is the ratio of true positive predictions to the total number of positive predictions. The precision rates for LSTM, RNN, IDS, and BSHNN are 76.24%, 90.24%, 91.4%, and 96.40%, respectively, when the arrival packet rate (attacks) is 20%. This signifies that the BSHNN method is better for accurately identifying and permitting legitimate flows, contributing to enhanced precision in intrusion detection and prevention compared to other existing methods. Table 4 shows the performance metrics of the proposed BSHNN method, which outperforms established methods such as LSTM, RNN, and IDS in accuracy, precision, and recall. The BSHNN efficiently manages feature extraction and optimization tasks, aiming to differentiate between normal and malicious packets using features extracted from packets and leveraging its unique capabilities. The BSHNN algorithm's exceptional performance in accurate predictions, positive case identification, and capturing a high percentage of relevant events makes it a robust solution for intrusion detection and prevention. The detection rate and authentication time metrics are compared in Table 5.  
Figure 8: BSHNN method’s simulation results. (**a**) Recall. (**b**) Precision. BSHNN uses parallel processing to expedite authentication by verifying multiple users simultaneously, resulting in faster results compared to ML-IDP. Its low computational overhead reduces the time required for authentication by 9.76 s for 10 mobile users, 10.25 s for 20 users, and 16.2 s for 50 users compared to ML-IDP's 21.9 s. Even the delay is drastically improved by an average of 20% with respect to the increasing number of switches. This efficiency is evident even with increased user quantities. Table 6 provides a comprehensive comparison of throughput between ML-IDP and the proposed BSHNN method across different percentages of attacks and switches. Notably, at 2% of attacks, ML-IDP achieves a throughput of 137 Mbps, while BSHNN surpasses it with a higher throughput of 157 Mbps. As the attack percentage increases to 6%, ML-IDP achieves a throughput of 220 Mbps, and BSHNN demonstrates further improvement with a throughput of 246 Mbps. In more challenging scenarios with 10% attacks, ML-IDP attains a throughput of 384 Mbps, yet BSHNN maintains its superior performance with a higher throughput of 428 Mbps. Initially, both ML-IDP and BSHNN demonstrate minimal packet loss ratios of 0.1%, indicating highly efficient data transmission with negligible loss. As the number of switches increases to 6, ML-IDP experiences a notable rise in the packet loss ratio to 2.5%, highlighting potential challenges in data reliability. In contrast, BSHNN showcases increased resilience, maintaining a lower packet loss ratio of 1.5%. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{2}{c}{**Throughput**} & \multicolumn{2}{c}{**Packet Loss Ratio**} \\ \cline{2-5}
**\% of Attacks** & \multicolumn{2}{c}{**Methods**} & \multicolumn{2}{c}{**Methods**} \\ \cline{2-5}
**ML-IDP (Mbps)** & **BSHNN (Mbps)** & **Number of Switches** & \multicolumn{2}{c}{**ML-IDP (\%)**} & **BSHNN (\%)** \\ \hline
2 & 137 & 157 & 2 & 0.9 & 0.5 \\ \hline
4 & 189 & 204 & 3 & 1 & 0.8 \\ \hline
6 & 220 & 246 & 4 & 1.4 & 1.0 \\ \hline
8 & 250 & 276 & 5 & 1.7 & 1.2 \\ \hline
10 & 384 & 428 & 6 & 2.5 & 1.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of throughput and packet loss ratio. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{2}{c}{**Evaluation Metrics**} \\ \cline{2-4}
**Methods** & \multicolumn{2}{c}{**Accuracy (\%)**} & **Precision (\%)** & **Recall (\%)** \\ \hline LSTM [16] & 93.1 & 76.24 & 86.13 \\ \hline RNN [18] & 95 & 90.24 & 93.7 \\ \hline IDS [19] & 95.8 & 91.4 & 96.7 \\ \hline BSHNN (Proposed) & 98.02 & 96.40 & 97.53 \\ \hline \hline \end{tabular}
\end{table}