# A Study on PF-IFF-Based Diagnosis Model of Plant Equipment Failure
## 3 Approach
### Learning Process
#### 3.1.3 Identifying Abnormal Patterns Related to Each Failure Mode  
This step was to find the patterns associated with a certain failure mode. In this study, the pattern refers to the cluster of feature vectors. Figure 3 shows the process of identifying abnormal patterns which refer to patterns related to certain failure modes. Figure 4 shows the relations among feature vectors, patterns, and failure modes. Briefly, patterns were identified by clustering feature vectors with the K-means algorithm. Then, patterns were associated with a particular failure mode by the PF-IFF method. Detailed descriptions are as follows. Clustering Feature Vectors to Identify Patterns  
In this step, we applied the K-means method [26] to identify a pattern. The K-means divided the data into \(k\) clusters, which is a clustering method to minimize the square sum of the distances between the center points of the clusters and the points in the cluster. At this time, the number of clusters (\(k\)) suited to the data was obtained using the silhouette technique [27]. The silhouette value had a value between \(-1\) and \(1\). The larger the value, the better the cluster. Equations (4) and (5) explain how to calculate the silhouette value in a specific feature vector and the mean silhouette value in a specific cluster number:  
\[s(i)=\frac{b(i)-a(i)}{\max\{a(i),b(i)\}} \tag{4}\]  
\[\bar{s}(k)=\frac{\sum\limits_{i=1}^{m}s(i)}{m} \tag{5}\]  
Figure 4: Relations among feature vectors, patterns, and failure modes. Figure 3: Process for identifying abnormal patterns. Figure 2: Structure of feature vectors. In this study, it was assumed that the number of initial clusters was larger than the number of states of equipment, and the maximum cluster allowance (_r_) was determined by a number smaller than the number of feature vectors. The K-means algorithm and the silhouette method were used as follows:  
Step 1. Determine the initial value of \(k\) in K-means;  
Step 2. \(k\) feature vectors are arbitrarily extracted from the feature vector set FV = [Feature Vector1, Feature Vector2,..., Feature Vector m], and the extracted feature vectors are set as the centers of clusters;  
Step 3. For each feature vector in FV, the distance to the center of \(k\) clusters is obtained, and each feature vector is assigned to the cluster having the smallest distance from the center of each cluster;  
Step 4. Update the center of the cluster generated in Step 2 by calculating the averages of features included in feature vectors in the same cluster;  
Step 5. Steps 3 and 4 are repeated until the grouping of each feature vector is not changed;  
Step 6. Calculate the mean silhouette value when the number of clusters is \(k\) and repeat steps 2 to 6 until \(k\) becomes \(r\) with \(k\) = \(k\) + 1;  
Step 7. The result of clustering is derived when the average silhouette value at \(k\) is maximum. Calculating the Relations between Patterns and Failure Modes with PF-IFF  
In this step, the PF-IFF value was calculated to identify which pattern was more closely associated with a certain failure mode. The PF-IFF value was made based on the TF-IDF value. The TF-IDF is a statistical value indicating how important a particular word is in a particular document when there is a document set consisting of a plurality of documents. In this study, we used the PF-IFF value as a measure of how important a pattern is in a given failure mode in the presence of several failure modes. The PF-IFF value was calculated by Equations (6)-(8) as follows. \[pf(p,f)=0.5+\frac{0.5\times f(p,f)}{\max\{f(c,f):c\in f\}} \tag{6}\]  
\[iff(p,F)=\log(1+\frac{|F|}{|\{f\in F:p\in f\}|}) \tag{7}\]  
\[pfiff(p,f,F)=pf(p,f)\times iff(p,F) \tag{8}\]  
Here, \(pf(p,f)\) means the degree of occurrence of a specific pattern \(p\) in a certain failure mode \(f\), and \(iff(p,F)\) indicates the degree of the common occurrence of a specific pattern \(p\) in a failure mode set \(F\).