# Dual Hybrid Attention Mechanism-Based U-Net for Building Segmentation in Remote Sensing Images
## 3 Experiment
### Evaluation Indicators  
In order to provide a clearer understanding of the mathematical implications of evaluation metrics, let us introduce the concept of a confusion matrix. In the field of machine learning, a confusion matrix--also referred to as a possibility matrix or an error matrix--serves as a visual tool that is commonly utilized in supervised learning. Particularly in image accuracy assessment, it is instrumental in comparing predicted values against actual values, presenting the classification results' accuracy within the matrix. Its key aspects can be summarized as follows: (1) Each column of the confusion matrix signifies a predicted category, with the total in each column representing the number of data predicted as that category. (2) Each row corresponds to the true class of the data, and the total in each row signifies the number of instances of data belonging to that class. (3) The values within each column indicate the number of true data predicted as that class. The typical structure of a confusion matrix is illustrated in Table 1.  
To better express these concepts, we have the following abbreviations: (1) True Positive (TP): Instances where the sample's true class is positive, and the model correctly identifies it as positive. (2) False Negative (FN): Instances where the sample's true class is positive, but the model incorrectly identifies it as negative. (3) False Positive (FP): Instances where the sample's true class is negative, but the model incorrectly identifies it as positive. (4) True Negative (TN): Instances where the sample's true class is negative, and the model correctly identifies it as negative. From the confusion matrix, more advanced classification metrics can be derived: Accuracy, mIoU (mean Intersection over Union), Precision, Recall, and F1 Score. The following elaborates on these five evaluation metrics:  
Accuracy: Accuracy is the most commonly used metric for classification performance. It represents the precision of the network model, indicating the ratio of correct model identifications to the total number of samples. In general, higher accuracy implies better model performance. Accuracy evaluates the overall precision of the classifier. Its formula (Equation (10)) is expressed as follows:  
\[Accuracy=\frac{TP+TN}{TP+FN+FP+TN}. \tag{10}\]  
Precision: Also known as the positive predictive value, the precision indicates the proportion of true positive samples among those identified as positive by the model. Generally, a higher precision suggests a better model performance. Precision is a precise evaluation of the classifier's predictions for a specific category. Its formula (Equation (11)) is expressed as follows:  
\[Precision=\frac{TP}{TP+FP}. \tag{11}\]  
Recall: Also known as sensitivity or the true positive rate, recall represents the ratio of correctly identified positive samples to the total number of positive samples. Generally, a higher recall indicates that more positive samples are correctly predicted by the model, suggesting a better model performance. Its formula (Equation (12)) is expressed as follows:  
\[Recall=\frac{TP}{TP+FN}. \tag{12}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Reference Prediction** & **Positive** & **Negative** \\ \hline Positive & True Positive & False Negative \\ Negative & False Positive & True Negative \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Confusion Matrix StructurePrecision and recall are typically trade-off metrics. In general, when precision is high, recall tends to be low, and vice versa. _F\({}_{\beta}\)Score:_ The physical meaning of \(F_{\beta}\) is a weighted average of precision and recall. In the merging process, the weight of recall is \(\beta\) times that of precision, which is designed to balance the two criteria. When \(\beta\) is equal to 1, it corresponds to the commonly used _F\({}_{1}\)Score_ (Dice score). _F\({}_{1}\)Score_ considers recall and precision to be equally important.