## 3 The Proposed SP-IoUAV Model
### Intrusion Detection System (IDS)
#### 3.3.2 Intrusion Detection Engine
It represents the proportion of correct predictions (both true positives and true negatives) made by the model out of all instances in the dataset. Its formula is as follows:

\[\text{Accuracy}=\frac{TP+TN}{TP+TN+FP+FN}\times 100 \tag{27}\]

where _TP_ stands for true positives, _TN_ stands for true negatives, _FP_ stands for false positives, and _FN_ stands for false negatives. Figure 4 clearly illustrates the accuracy of our proposed model. The proposed SP-IoUAV model presents the highest accuracy of 99.98% compared to 95.5%, 99.89%, and 99.84% of the existing approaches, respectively. The reason behind this highest accuracy lies in its effective utilization of a combination of CNN-LSTM deep learning algorithms for anomaly detection and classification. #### 4.4.2 Precision

Precision, in the context of classification models, is a performance metric that measures the proportion of true positive predictions among all positive predictions made by the model. It helps to assess the model's ability to avoid false positive errors. It is calculated as follows:

\[Precision=\frac{TP}{TP+FP} \tag{28}\]

Figure 5 clearly illustrates the precision of our proposed model. Figure 4: Accuracy of our proposed SP-IoUAV model. As illustrated in Figure 5, our proposed model presents the highest precision of 99.93% compared to 94.8%, 99.89%, and 99.76% of the existing approaches, respectively. This is due to the robust data preprocessing techniques employed in our model, which includes data normalization, feature extraction, and data transformation. These preprocessing steps enhance the quality and relevance of the input data, resulting in better representation and separation of the positive samples from the negative ones during the training phase. As a consequence, the model achieves a higher proportion of true positive predictions among all positive predictions, minimizing false positive errors and leading to the improved precision observed in our results. #### 4.4.3 Recall

Recall, also known as true positive rate or sensitivity, is a metric used in classification tasks to measure the ability of a model to correctly identify positive instances (i.e., the proportion of actual positive samples that were correctly predicted as positive by the model). The formula for recall is given as:

\[\text{Recall}=\frac{TP}{TP+FN} \tag{29}\]

Figure 6 clearly illustrates the recall of our proposed SP-IoUAV Model. Figure 5: Precision of our proposed SP-IoUAV Model. Figure 6: Recall of our proposed SP-IoUAV Model. As illustrated in Figure 6, our proposed model also presents the highest recall of 99.92% compared to 94.3%, 99.89%, and 99.68% of the existing approaches, respectively. This is due to its ability to effectively detect and capture a larger proportion of true positive instances (intrusions) in the dataset. The incorporation of sophisticated deep learning algorithms, such as CNN-LSTM, and the utilization of a comprehensive data preprocessing approach that includes data normalization, feature extraction, and data transformation techniques contribute to the model's exceptional performance in accurately identifying and recalling instances of intrusions, even in complex and dynamic UAV environments. #### 4.4.4 F-Score

The \(F\)-score, also known as the F1-score, is a performance metric used to evaluate the balance between precision and recall of a classification model. It considers both false positives and false negatives, making it a useful measure when dealing with imbalanced datasets. The formula for \(F\)-score is given by:

\[F\text{-Score}=\frac{2\times\text{Precision}\times\text{Recall}}{\text{ Precision}+\text{Recall}} \tag{30}\]

Figure 7 clearly illustrates \(F\)-score of our proposed model. Our SP-IoUAV model has the highest \(F\)-score of 99.92%, compared to 94.3%, 99.89%, and 99.68% of the existing approaches. This is due to the synergistic combination of precision and recall achieved by integrating CNN-LSTM deep learning algorithms for anomaly detection and classification.