## 5 Similarity Measurement of the Accident Cases
### Local Similarity
#### 5.1.2 Similarity of Symbolic Attributes
As shown in Equation (3), this similarity is obtained by calculating the average value of the similarities based on the semantic tree and the upper attributes: \[\text{Sim}_{c}(X_{i},Y_{i})=\beta\text{Sim}_{t}(X_{i},Y_{i})+\gamma\text{Sim}_{ s}(X_{i},Y_{i}),\;\beta+\gamma=1.\] (3)  
In Equation (3), \(\beta\) denotes the weight value of the similarity based on the semantic tree, and \(\gamma\) denotes the weight value of the similarity based on the upper attributes. The values of \(\beta\) and \(\gamma\) range from 0 to 1. In this paper, \(\beta\) and \(\gamma\) were set to 0.5, which suggests that the similarities based on the semantic tree and the upper attributes had equal influences. For example, the semantic concept tree of signal failure illustrated in Figure 5 supports the similarity measure between the signal failure attributes. An example is given to show the calculation process of the similarity using the aforementioned methods. The similarity between \"turnout failure\" (abbreviated as \(T\)) and \"STC equipment failure\" (abbreviated as \(S\)) was calculated as follows. First, as shown in (4), we needed to measure the tree similarity based on the developed semantic model using Equation (2). Then, the tree similarity of the upper attribute was calculated in (5). The upper attribute of \"turnout indication failure\" and \"STC equipment failure\" was \"wayside equipment failure\" (abbreviated as \(W\)) and \"signal system infrastructure\" (abbreviated as \(I\)), respectively. Finally, the comprehensive similarity between \(T\) and \(S\) can be measured in (6) using Equation (3), where the value was 0.133. Thus, as shown in Table 4, the similarity values between the attributes of signal failure were obtained. \[dl(T) =4,\;dl(S) =3,\;maxdl =5,\;dis(T,S) =3,\;|dl(T)-dl(S)|=1, \tag{4}\] \[\text{Sim}_{t}(T,S) =\frac{0.5\times(3\;+\;4)}{(3\;+\;0.5)\times 2\times 5\times 1 } =0.100\] \[dl(W) =3,dl(I) =2,\;dis(W,I)=1,\;\text{Sim}_{t}(W,I)=\frac{0.5\times(2\;+\;3)}{( 1\;+\;0.5)\times 2\times 5\times 1}=0.166\] (5) \[\text{Sim}_{c}(T,S) =\frac{(\text{Sim}_{t}(T,S)\;+\;\text{Sim}_{s}(T,S))}{2}=\frac{( 0.100\;+\;0.167)}{2}=0.133 \tag{6}\]  
Figure 5: Semantic concept tree of signal failure. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Semantic Concept**} & **STC Equipment** & **Annualator** & **Relay** & **Aide Counting** & **Timout Indication** & **Single VOBC** & **Two** & **TMS** & **Communication** \\  & **Failure** & **Failure** & **Failure** & **Failure** & **Failure** & **Failure** & **Failure** & **VOBC Failures** & **Failure** & **Loss/Cutout** \\ \hline \hline
**STC Equipment Failure** & \(1\) & & & & & & & & & \\ Annualator Failure & 0.218 & 1 & & & & & & & \\ Relay Failure & 0.218 & 0.65 & 1 & & & & & & \\ Aide Counting Failure & 0.133 & 0.302 & 0.302 & 1 & & & & & \\ Turnout Indication Failure & 0.133 & 0.302 & 0.302 & 0.293 & 1 & & & & \\ Single VOBC Failure & 0.07 & 0.166 & 0.166 & 0.174 & 0.174 & 1 & & & \\ Two VOBC Failures & 0.07 & 0.166 & 0.166 & 0.174 & 0.174 & 0.7 & 1 & & \\ TVB Failure & 0.14 & 0.155 & 0.155 & 0.166 & 0.166 & 0.302 & 0.302 & 1 & \\ Communication & 0.14 & 0.155 & 0.155 & 0.166 & 0.166 & 0.302 & 0.302 & 0.207 & 1 \\ Low/Cutout & & & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Similarity between the semantic concepts of partial signal failures.