# A Framework for Diagnosing Urban Rail Train Turn-Back Faults Based on Rules and Algorithms
## 6 Experiment  
### Diagnostic Type Classification  
Two main conclusions can be drawn from Figure 5. First, the internal rules of automatic end change (AEC) and automatic turn-back (ATB) are relatively similar. In the real scene, because the train has more data and related rules for automatic turn-back, it is easier to be identified and distinguished by the algorithm. Second, the communication code rules for point mode end change (PEC) and safety are relatively similar, but the safety data are much larger than the data of the other three types of turn-back failures, which makes the safety data easier to distinguish. It is not easy to distinguish the PEC fault data. As shown in Table 3, the calculated F1-score and average value (macro F1-score) are predicted by the classification algorithm for each category (safety and three types of turn-back failures). The average value causes the displayed score to decrease, but in this business scenario, the performance of the algorithm is better. The F1-score is used with a lower score to show the business difficulties caused by the imbalance of fault categories and overlap of rules more clearly. Among the eight classification algorithms, the tree-based model and the SVM based on the radial perform better. In business scenarios, tree-based models are more applicable due to their attributes, such as high speed, low cost, and good interpretability. The predictive performance of the safety category is much better than that of the other categories. This is because, in the experimental design, the category proportion distribution of the data set is maintained to be consistent with the real scene. In reality, the frequency of failures is relatively small, and the algorithm is affected by imbalanced distribution, which makes it difficult to identify the fault. It can also be found that the predictive performance of the Automatic Turn-Back (ATB) failure category is significantly better than that of the other two types of faults, which is in line with the above analysis of the Venn diagram of the fault rule in Figure 5. There are many overlaps in various fault rules composed of a single communication code feature, and it is necessary to construct more synthetic features to more closely reflect the signal interaction between train modules when a fault occurs in order to better distinguish the faults during the three types of reentry. As shown in Table 4, the F1-score of each category improved after feature interaction. In the urban rail system, the module signals of the train interact with each other, which has a strong correlation with the return. Therefore, the use of feature intersection has practical significance, and the results produced can also be well interpretated. Among the eight classification algorithms, the gradient boosting decision tree (GBDT) is the best at learning the interactive information of the communication code and has the best prediction performance. Figure 5: Venn diagram of generated rules per class. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **RF** & **GBDT** & **AdaBoost** & **CART** & **LR** & **SVM (Linear)** & **SVM (Radial)** & **NB** \\ \hline Safe & 0.9504 & 0.9499 & 0.8873 & 0.9504 & 0.9381 & 0.9331 & 0.9496 & 0.8797 \\ PEC & 0.6237 & 0.6210 & 0.4987 & 0.6239 & 0.5723 & 0.5388 & 0.6159 & 0.5045 \\ ATB & 0.7756 & 0.7736 & 0.7545 & 0.7757 & 0.7466 & 0.7409 & 0.7702 & 0.6307 \\ AEC & 0.6268 & 0.6216 & 0.6021 & 0.6268 & 0.5354 & 0.5548 & 0.6107 & 0.3479 \\ Average & 0.7441 & 0.7415 & 0.6856 & 0.7442 & 0.6981 & 0.6919 & 0.7366 & 0.5907 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: F1-score before feature interaction. In Figure 6, according to the degree of positive or negative contribution of features to the prediction of each category, it is obvious that the crossed features are relatively important. The foldbackindicator, workmode, and trainspeed features have the best performance.