# Clustering Analysis of Wind Turbine Alarm Sequences Based on Domain Knowledge-Fused Word2 vec
## 5 Results and Discussion
### Results  
#### 5.3.1 The Clustering Results of Labeled Alarm Sequences  
The clustering results based on WMD are illustrated in Figure 7, with Figure 7a representing the Purity metric and Figure 7b representing the ARI metric. In Figure 7a, the \(x\)-axis represents the semantic window length, while the \(y\)-axis denotes the values of Purity. The weight of the category loss is differentiated by varying shades of purple, where deeper shades indicate a higher proportion of category loss weight. In Figure 7b, the annotations are similar to Figure 7a, where the \(x\)-axis represents the semantic window length, and the \(y\)-axis represents the ARI values. The weight of the category loss is distinguished by varying shades of blue, with deeper shades indicating a higher proportion of category loss weight. Due to the sensitivity of the K-means algorithm to the initial selection of cluster centroids, it can lead to different outcomes. The data in this study were tested five times under the same parameter settings, and the average values were reported. It can be observed that the weight \(\lambda\) significantly impacts the clustering results. When the weight \(\lambda\) is set to 0, the obtained results correspond to those obtained using the original loss function of Word2 vec. With the increase in the proportion of category loss, the overall clustering performance exhibits an initial improvement followed by a decline. When the weight \(\lambda\) is 0.4, both Purity and ARI reach their maximum values. Therefore, it can be concluded that by incorporating the alarm category information provided by domain knowledge, the alignment between the alarm vector representation and actual fault patterns \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Turbine** & **Triggering** & **Alarm Types** & **Alarm Codes** & **Alarm Flags** & **Description** \\ \hline PX & 10 September & & & & \\  & 2016 07:53:17 & Fault & T392 & Start & - \\  & 10 September & & & & \\  & 2016 07:53:18 & Fault & T393 & Start & - \\  & 10 September & & & & \\  & 2016 07:53:21 & Fault & T354 & End & - \\  & 10 September & & & & \\  & 2016 07:53:23 & Fault & T391 & Start & - \\  & 10 September & & & & \\  & 2016 07:53:25 & Fault & T353 & Start & - \\  & 10 September & & & & \\  & 2016 07:53:26 & Information & I2 & End & - \\ \hline \hline \end{tabular}
\end{table} 
Table 4: _Cont._  
Figure 6: The alarm vectors displayed in a three-dimensional plot. can be enhanced. However, the proportion of category loss should not be excessively high, as the context semantic information captured by the original Word2 vec is also crucial for the vector transformation of alarms. Furthermore, it can be observed that the length of the semantic window also affects the clustering performance. When the semantic window is set to 4, the overall performance is the best. The clustering results based on WRD and AVD are shown in Figures 8 and 9, respectively, with the same annotations as in Figure 7. As depicted in Figure 8, the clustering results using WRD follow a similar pattern as those using WMD, but the WRD-based results exhibit superior performance to the WMD-based results. In Figure 9, the overall clustering performance based on AVD is not as satisfactory as that based on WRD and WMD. This is because when computing AVD, the multi-dimensional information of alarm vectors significantly collapses, leading to the underutilization of essential information. This demonstrates that employing WMD and WRD as distance metrics in K-means clustering can effectively enhance the clustering performance of alarm sequences. Figure 8: The clustering results based on WRD: **(a)** The results of Purity; **(b)** The result of ARI. Figure 7: The clustering results based on WMD: **(a)** The results of Purity; **(b)** The result of ARI. Furthermore, we compared our alarm numerical representation method with the existing methods used in prior research. Specifically, we employed the binary vector representation method from Ref.