## 3 The Proposed Fault Diagnosis Methodology
### Pretraining Alarm Vectors  
The unlabeled alarm sequences are often ignored and not fully utilized in the existing methods. However, they are generated by the alarm system under a normal alarm mechanism and thus contain potential information about the relationship among individual alarms. This effective information can help in the fault diagnosis of alarm sequences. In this paper, a word embedding method is used to mine the potential relationship between individual alarms. In natural language processing (NLP), words of plain text can be transformed into real-valued data by the word embedding method [26]. The words are represented as vectors so that machine learning algorithms can be used in various NLP tasks. In a comparison study of various word embedding methods, [PERSON] et al. [27] concluded that Word2 Vec worked better for word representation within a low-dimensional semantic space. Word2 Vec is a neural-network-based word embedding method, which includes two models: the continuous bag-of-words (CBOW) and the Skip-gram model. The Skip-gram model has several advantages compared to CBOW: (1) Flexibility: The Skip-gram model is more flexible as it predicts the context words given a target word. This allows it to capture a wider range of contextual information, resulting in a better representation of word semantics. (2) Handling rare words: The Skip-gram model performs better in handling rare words (low-frequency words). Unlike CBOW, which sums up the vectors of context words, Skip-gram avoids the dominance of dense high-frequency words, enabling better capturing of rare word features. (3) Modeling short texts: The Skip-gram model performs better when dealing with short texts. CBOW, due to the summing operation on context word vectors, may lose some contextual information in short texts. Skip-gram, by predicting each context word individually, better preserves the semantic information in short texts. Accordingly, the Skip-gram model is used in this study. The Skip-gram model [28] regards a corpus of words as inputs and produces a corresponding vector from \(R^{n}\) (\(n\) is the embedding-space dimension) for each unique word in the corpus. In the embedding space, the vectors of words that occur regularly nearby in the corpus are positioned close. Therefore, the word vectors capture and express the contextual similarities of words. When training the Skip-gram model using unlabeled alarm sequences, the single alarm is regarded as a word expressing semantics. An alarm sequence is regarded as a sentence describing a fault of a wind turbine. All the unlabeled alarm sequences constitute a corpus. A brief description of the Skip-gram is given as follows [29]:  
Given a sentence \(s=w_{1},w_{2},\ldots,w_{i},\ldots,w_{n}(w_{i}\in D)\), \(D\) is the collection of words. We model each word \(w_{i}\) by using its context words \(w_{i-ws},\ldots,w_{i-1},w_{i+1},\ldots w_{i+ws}\), where 2 \(\times\)\(ws\) is the width of the considering context window. The center word and context words are projected into two types of embeddings \(v_{i}\) and \(v^{\prime}_{i+j}(1\leq\mid\mid\leq ws)\), respectively,  
Figure 3: The match criterion of alarm sequences and maintenance records. as shown in Figure 4. The training goal of the Skip-gram model is to find word vector representations that help predict contextual words in a sentence.