## 5 Discussion  
Our study evaluated the performance of different machine learning models for multi-class intrusion detection in the Internet of Vehicles (IoV) using the CICIoV2024 dataset [8]. We used two different training methods: a train-test split, and a 10-fold cross-validation approach, to rigorously evaluate the performance of the models. Table 5 (Section 4) compares our results using the train-test split with those reported by [PERSON] et al. [8] and [PERSON] and [PERSON] [17]. Our optimized models, particularly Random Forest, Deep Neural Network, XGBoost, and Extra Trees, showed exceptional performance across all metrics. In contrast, the authors in [8; 17] reported significantly lower performance, especially in precision and recall. Due to our optimization strategy, we were able to achieve perfect results, while [PERSON] et al. [8] achieved the highest F1-score of 0.78 with DNN and 0.76 with RF, and [PERSON] and [PERSON] [17] an F1-score of 0.9679 and 0.9745 for the same models, respectively. However, when we changed the training approach to a 10-fold cross-validation, our results, shown in Table 6, for AdaBoost were worse for every metric, compared to [PERSON] et al. [8], [PERSON] and [PERSON] [17], and our results in the train-test setting. Regarding the remaining tested models in the 10-fold cross-validation RF, DNN, ET, XGBoost, and LR-we were still able to obtain optimal values, with perfect scores for RF, ET, XGBoost, and DNN. Logistic Regression, while not achieving perfect scores, still maintained high performance, indicating its suitability for this task. The consistent high performance of RF, XGBoost, ET, and DNN across both evaluation strategies underscores their effectiveness in handling imbalanced multi-class datasets. This can be attributed to the combination of hyperparameter optimization, which fine-tunes key parameters such as tree depth, learning rate, and the number of estimators, and its inherent ability to adapt to imbalanced datasets. In particular, tree-based ensemble methods, such as RF and ET, along with XGBoost, exploited the randomness and sequential learning inherent in their algorithms to effectively handle the skewed distribution of benign and malicious traffic. Although DNN is prone to overfitting with complex datasets, we used its deep structure to learn intricate patterns in the data, thus contributing to its perfect performance against all types of attacks. In comparison, AdaBoost faced notable challenges, particularly in detecting minority attacks and in efficiency with a considerably high computational cost. Although it showed reasonable accuracy, its recall dropped significantly, reflecting the model's sensitivity to class imbalance in the dataset. AdaBoost iteratively adjusts the weights for misclassified instances, which in imbalanced data can amplify the influence of the dominant class, thereby reducing its ability to effectively detect the less common attack types. This underperfor \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Model** & **Precision** & **Recall** & **Accuracy** & **F1-Score** \\ \hline Random Forest & 1.00 & 1.00 & 1.00 & 1.00 \\ AdaBoost & 0.30 & 0.33 & 0.92 & 0.32 \\ XGBoost & 1.00 & 1.00 & 1.00 & 1.00 \\ Logistic Regression & 0.98 & 0.86 & 0.97 & 0.88 \\ Extra Trees & 1.00 & 1.00 & 1.00 & 1.00 \\ Deep Neural Networks & 1.00 & 1.00 & 1.00 & 1.00 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance comparison of different models using 10-fold training. mance is consistent with AdaBoost's limitation when dealing with imbalanced datasets [25], where additional techniques, such as adjusting class weights, are often required to improve its performance in similar real-world scenarios. While logistic regression did not achieve perfect scores and found some challenges in computational efficiency, it maintained competitive results and outperformed AdaBoost, which is consistent with [26] when dealing with imbalanced datasets.