## 7 Discussion  
The combined use of the LOA and Cb-C for detecting DoS attacks in IoT-based WSNs demonstrates significant improvements over traditional unimodal and hybrid algorithms. The LOA's ability to balance exploration and exploitation during the search process enhances the algorithm's adaptability to dynamic WSN environments. Unlike unimodal algorithms that struggle with local optima, the LOA's population-based approach ensures robust convergence toward optimal solutions, making it well-suited for the detection of complex attack patterns. Additionally, the LOA's iterative process allows for more effective detection of diverse attack types, resulting in improved classification accuracy.  
The Cb-C, known for its fast, high-performance gradient boosting technique, further strengthens the detection mechanism. Its unique symmetric tree structure accelerates prediction times and reduces overfitting, which is crucial for maintaining high accuracy in real-time environments like IoT-based WSNs. By leveraging an advanced ordered target statistics method for handling categorical data, CatBoost mitigates issues related to target leakage and enhances model generalization. This is particularly important in the context of intrusion detection, where the correct classification of network traffic and attack types is critical for system security.  
In comparison to other hybrid algorithms, the LOA-Cb-C combination delivers superior results in terms of detection accuracy, computational efficiency, and adaptability to real-time network changes. While some challenges remain, such as managing computational complexity in resource-constrained WSN environments, the method's scalability and flexibility in addressing diverse attack vectors present strong advantages. Future work can extend this approach to detect a broader range of attacks, while also exploring further optimization techniques to improve computational efficiency.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Algorithm/Model**} & \multicolumn{5}{c}{**Performance Metrics**} \\ \cline{2-6}  & **Accuracy** & **Error** & **Precision** & **Recall** & **F1-Score** \\ \hline LOA-Cb-C (Proposed model) & 99.66 & 0.34 & 0.99 & 0.99 & 0.99 \\ \hline Gboost [36] & 99.60 & 0.40 & - & - & 0.98 \\ \hline MVFS [18] & 99.50 & 0.50 & 0.97 & 0.96 & 0.96 \\ \hline DLDM [37] & 99.20 & 0.80 & - & - & - \\ \hline CNN [30] & 98.79 & 1.21 & 0.94 & 0.92 & 0.93 \\ \hline SVM [35] & 98.72 & 1.28 & - & - & - \\ \hline RF [28] & 98.00 & 2.00 & 0.99 & 0.96 & 0.97 \\ \hline MLML [22] & 97.65 & 2.35 & 0.94 & 0.96 & 0.93 \\ \hline DNN [30] & 97.04 & 2.96 & 0.82 & 0.82 & 0.82 \\ \hline DT [28] & 97.00 & 3.00 & 0.94 & 0.95 & 0.95 \\ \hline CNN + RNN [30] & 96.86 & 3.14 & 0.85 & 0.85 & 0.82 \\ \hline RNN [30] & 96.48 & 3.52 & 0.85 & 0.69 & 0.75 \\ \hline NB [28] & 94.60 & 5.40 & 0.32 & 0.76 & 0.45 \\ \hline LR [28] & 93.40 & 6.60 & 0.88 & 0.77 & 0.82 \\ \hline NNC-PSOR [19] & 93.00 & 7.00 & 0.93 & 0.92 & 0.92 \\ \hline ANN [29] & 91.96 & 8.04 & 1.00 & 1.00 & 1.00 \\ \hline KNN [28] & 83.80 & 16.20 & 0.69 & 0.66 & 0.68 \\ \hline \hline \end{tabular}
\end{table}
Table 7: LOA-Cb-C comparison with other reported techniques.