## 4 Metro Track Geometry Defect Identification Model and Its Optimization Method
### Model-Performance Evaluation Metric
#### 4.3.2 TGD-Identification Performance-Evaluation Metric  
The common evaluation metrics used in ML classification tasks are the precision and recall metrics. The higher the precision, the fewer will be the frequency of false alarms; the higher the recall, the fewer will be the frequency of missed detections. To account for the precision and recall, using their harmonic mean \(F_{\beta}\)-score is a prerequisite [56], where \(\beta\) represents the weighting factor of the recall, indicating the importance of the recall relative to the precision.  
Considering the existence of different classes of severity levels, this study constructs a TGD F-score (\(F_{2}^{\text{TGD}}\)) (based on the \(F_{\beta}\)-score of \(\beta=2\) under each severity level of TGD), which is used to evaluate the comprehensive diagnosis performance of the model in the MTGDI-CNN development problem, as shown in Equations (16)-(19). \(F_{2}^{\text{TGD}}\) is the harmonic average of the comprehensive prediction performance of the model for each severity level.  
The higher the value, the better the comprehensive identification performance of the model for each severity level of a defect.  
\[F_{2}^{\text{TGD}}=\frac{(n_{c}+1)\cdot\prod_{i=0}^{n_{c}}F_{2}^{(i)}}{\sum_{i=0 }^{n_{c}}\biggl{(}\frac{1}{F_{2}^{(i)}\prod_{i=0}^{n_{c}}F_{2}^{(i)}}\biggr{)}}, \tag{16}\]  
\[F_{2}^{(i)}=\frac{5\cdot P\cdot R}{4P+R^{\prime}}, \tag{17}\]  
\[P^{(i)}=\frac{\text{TP}^{(i)}}{\text{TP}^{(i)}+\text{FP}^{(i)}}, \tag{18}\]  
\[R^{(i)}=\frac{\text{TP}^{(i)}}{\text{TP}^{(i)}+\text{FN}^{(i)}}, \tag{19}\]  
where \(i\) represents the class of severity levels of TGD, \(\text{TP}^{(i)}\) depicts the number of true positive cases (prediction class is \(i\), and true class is \(i\)) with class \(i\), \(\text{FP}^{(i)}\) symbolizes the number of false positive cases (prediction class is \(i\), and true class is not \(i\)) with class \(i\), \(\text{FN}^{(i)}\) represents the number of false negative cases (prediction class is not \(i\), and true class is \(i\)) with class \(i\), \(P^{(i)}\) denotes the precision value of class \(i\), \(R^{(i)}\) represents the recall value of class \(i\), and \(F_{2}^{(i)}\) implies the \(F_{2}\)-score value of class \(i\).  
In addition, the occurrence of false positives (FP) and false negatives (FN) is often measured by the metrics false discovery rate (FDR) and false negative rate (FNR), as shown in Equations (20) and (21), respectively. Furthermore, there is a relationship between these metrics and precision and recall, as shown in Equations (22) and (23). Therefore, when \(F_{2}^{(i)}\) is high, the proportion of FP and FN in the model will be low.  
\[FDR^{(i)}=\frac{FP^{(i)}}{TP^{(i)}+\text{FP}^{(i)}}, \tag{20}\]  
\[\text{FNR}^{(i)}=\frac{\text{FN}^{(i)}}{\text{TP}^{(i)}+\text{FN}^{(i)}}, \tag{21}\]  
\[\text{FDR}^{(i)}=1-P^{(i)}, \tag{22}\]  
\[\text{FNR}^{(i)}=1-R^{(i)}, \tag{23}\]  
where \(\text{FDR}^{(i)}\) denotes the false discovery rate value of class \(i\), and \(\text{FNR}^{(i)}\) represents the false negative rate value of class \(i\).