## 3 Background Models
### Evaluation Metrics  
The confusion matrix is essential for evaluating the model performance in classification problems. It is a two-dimensional matrix with rows representing the true classes and columns representing the predicted classes, as shown in Table 1. Each element of the confusion matrix represents the prediction of the model for samples belonging to a certain true class.  
True positive (\(TP\)) refers to the number of actual positive instances that the model correctly predicts as positive; false positive (\(FP\)) refers to the number of negative instances that the model incorrectly predicts as positive; false negative (\(FN\)) refers to the number of positive instances the model incorrectly predicts as negative; and true negative (\(TN\)) refers to the number of actual negative instances that the model correctly predicts as unfavorable. Based on these metrics, we can calculate many evaluation metrics for assessing the performance of classification models, including accuracy, recall, F1 score, and specificity.  
Accuracy: Accuracy refers to the proportion of samples correctly predicted by the model out of the total number of samples.  
\[\text{Accuracy}=\frac{TP+TN}{TP+TN+FP+FN} \tag{1}\]  
Precision: Precision refers to the proportion of samples that the model correctly predicts as positive out of all samples predicted as positive.  
\[\text{Precision}=\frac{TP}{TP+FP} \tag{2}\]  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & & \multicolumn{2}{c}{**Predicted**} \\  & & **Positive** & **Negative** \\ \hline Actual & Positive & \(TP\) & \(FN\) \\  & Negative & \(FP\) & \(TN\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Confusion matrix of actual vs. predicted classifications.  
Figure 2: Dropout layer working principle.  
Recall: Recall refers to the proportion of samples that the model correctly predicts as positive among all positive samples.  
\[\text{Recall}=\frac{TP}{TP+FN} \tag{3}\]  
Specificity: This measures a model's ability to correctly predict negative instances among all true negatives in a binary classification problem. Specifically, it refers to the proportion of true negatives that the model correctly identified as unfavorable.  
\[\text{Specificity}=\frac{TN}{TN+FP} \tag{4}\]  
F1 score: F1 score is the harmonic mean of precision and recall and is used for the comprehensive evaluation of model performance.  
\[\text{F1}=2\times\frac{\text{Precision}\times\text{Recall}}{\text{Precision}+ \text{Recall}} \tag{5}\]  
G-mean: The G-mean is a composite evaluation metric commonly used to assess the performance of binary classification models on imbalanced datasets.  
\[\text{G-mean}=\sqrt{\text{Recall}\times\text{Precision}} \tag{6}\]  
P-mean: P-mean evaluates the performance of a classifier by computing the geometric mean of precision and recall. Unlike the F1 score, the P-mean does not apply a weighted average to precision and recall, making it particularly valuable in scenarios where the costs of false positives and false negatives differ.  
\[\text{P-mean}=\sqrt{\text{Recall}\times\text{Specificity}} \tag{7}\]  
These evaluation metrics are all based on a binary classification performance evaluation. In this study, to address class imbalance in multiclass problems, we adopted the one-vs.-rest (OvR) [40] approach. This method treats the focus class (minority class samples) as positive. It combines the remaining nine classes into a negative class, transforming the multiclass problem into a series of binary classification problems. By utilizing these traditional binary classification metrics, we can better assess the performance of the model in handling imbalanced multiclass datasets, particularly its ability to recognize minority class samples, and overall classification performance. These metrics provide a comprehensive classifier evaluation across different classes, aiding in optimizing the model parameters to improve the classification accuracy and recall.