## 5 Simulation Results
### Testing Performance  
Testing is an important part of evaluating the trained model, in which unseen data are provided to the trained model to measure the true prediction performance of the trained model. Figure 11 shows the testing of the LSVM-trained model, in which the 20125 instances are correctly predicted as class 0 (normal traffic), and they belong to class 0 (normal traffic), referred to as a true positive (TP). However, 254 instances are wrongly predicted as class 1 (attack traffic), while they belong to class 0 (normal traffic), referred to as a false negative (FN). The LSVM predicts 312 instances as class 1 (attack traffic), while they belong to class 0 (normal traffic) known as a false positive(FP), and correctly predicts 3383 instances as class 1 (attack traffic) members, known as a true negative(TN). The LSVM attains an overall classification accuracy (CA) of 97.64%, misclassification rate (MCR) of 2.35%, sensitivity of 98.75%, specificity of 91.55%, negative partial value (NPV) of 93.01%, false positive rate (FPR) of 10.91%, false negative rate (FNR) of 3.27%, and precision of 96.51%. Figure 10: Error Histogram graph of ANN algorithm. Figure 9: ANN-based model training for DoS attack in AVs. Figure 12, shows the testing performance of the coarse Gaussian SVM (CGSVM) algorithm in the form of a confusion matrix. The confusion matrix shows that 19,328 instances are accurately predicted, while 51 instances are predicted as class 1 (attack traffic) instances while belonging to class 0 (normal traffic). For class 1 (attack traffic), 233 instances are wrongly predicted that actually belong to class 0 (normal traffic), and 4462 instances are correctly classified. The statistical performance of the CGSVM classifier is given in Table 1. The CGSVM classifier attains an overall classification accuracy (CA) of 98.82%, misclassification rate (MCR) of 1.17%, sensitivity of 99.73%, specificity of 95.03%, NPV of 98.86%, FPR of 4.96%, FNR of 0.26%, and precision of 98.80%. Figure 13 below shows the prediction performance of the ANN algorithm, in which 17,640 instances are true positive predictions while 637 instances are false negative predictions of class 0 (normal traffic). For class 1 (attack traffic), 598 are false positive predictions, since, in reality, they belong to class 0 (normal traffic), and 5199 instances are true negative predictions, meaning they are correctly predicted. The statistical evaluation of the ANN algorithm provides the performance measurements given in Table 1. The ANN algorithm achieves a CA of 94.86%, MCR of 5.13%, sensitivity of 96.72%, specificity of 89.08%, NPV of 89.68%, FPR of 10.91%, FNR of 3.27%, and precision of 96.51%. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Parameter** & **CA (\%)** & **MCR (\%)** & **Sensitivity (\%)** & **Specificity (\%)** & **NPV (\%)** & **FPR (\%)** & **FNR (\%)** & **Precision (\%)** \\ \hline ANN & 94.86 & 5.13 & 96.72 & 89.08 & 89.68 & 10.91 & 3.27 & 96.51 \\ LSVM & 97.64 & 2.35 & 98.75 & 91.55 & 93.01 & 8.44 & 1.24 & 91.55 \\ CGSVM & 98.82 & 1.17 & 99.73 & 95.03 & 98.86 & 4.96 & 0.26 & 98.80 \\ VEL & 99.16 & 0.83 & 99.35 & 98.12 & 96.66 & 1.87 & 0.006 & 99.64 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Statistical performance of ANN, LSVM, CGSVM, and VEL. Figure 11: Confusion matrix of linear SVM testing. Figure 14, illustrates the prediction performance determined through a voting mechanism by combing the aforementioned classifiers, i.e., the ANN algorithm, LSVM, and CGSVM classifiers. In the VEL mechanism, the decision is made based on the majority of the classifier prediction values. After incorporating the voting mechanism, 20,105 instances are correctly classified as true positives, while 130 instances are misclassified as false negatives for class 0 (normal traffic). For class 1 (attack traffic), only 72 instances are wrongly predicted as false positives, while 3767 instances are correctly predicted as true negatives.