## 4 Examples of Application
### Valve Abnormality Alarm and Fault Diagnosis  
In this experiment, 490 data were collected under each working condition of the diesel engine. Three different operating speeds (1500, 1800, and 2100 rpm) were investigated, and for every normal or fault conditions, there were 50 training and 20 test samples. For the importance of fault alarm in the actual diesel engine, the normal or abnormal state should be identified first. So online monitoring system on site could timely give a warning to the machine protectors when the valve clearance was abnormal. A total of 420 groups of characteristic data in the test set were input into the RF algorithm for abnormal alarm processing, among which 60 groups were normal characteristic data and the remaining 360 groups were abnormal characteristic data. The comparison result of the classification effect of the RF reduction dimension and the initial feature vector was shown in Table 6.  
The above analysis showed that the use of the RF algorithm for feature selection could retain the main feature information, that was, while reducing the data dimension, the recognition rate basically remained the same, and the time was significantly reduced, effectively improving the efficiency of fault diagnosis. In addition, this method ensured that the average recognition accuracy was above 90%, and could accurately make an alarm when the valve clearance became abnormal. In order to help the on-site personnel to diagnose the fault type preliminary, under the premise that the system had made an abnormal alarm, it was necessary to make further decisions on what fault type the valve specifically belonged to. For the 1260 groups of the abnormal valve data, there \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Data Processing Method** & **Recognition Accuracy of Normal State/\%** & **Recognition Accuracy of Abnormal State/\%** & **Average Recognition Accuracy/\%** & **Running Time of Program/s** \\ \hline RF reduction dimension initial feature vector & 91.67 (55/60) & 92.5 (333/360) & 92.38 (388/420) & 7.22 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The comparison result of the classification effect. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Characteristic Parameters** & **Normal** & **Fault 1** & **Fault 2** & **Fault 3** & **Fault 4** & **Fault 5** & **Fault 6** \\ \hline D22 spectral energy & 171.90 & 189.17 & 189.73 & 110.79 & 333.94 & 200.77 & 338.66 \\ D21 spectral energy & 26.59 & 31.73 & 24.49 & 23.98 & 48.53 & 51.77 & 36.34 \\ D23 spectral energy & 20.65 & 34.38 & 20.54 & 81.33 & 27.35 & 58.37 & 28.03 \\ Skewness & 521.87 & 351.68 & 340.76 & 269.50 & 267.59 & 151.36 & 71.69 \\ RMS value & 12.23 & 13.39 & 12.65 & 11.97 & 16.59 & 14.73 & 17.10 \\ K factor & 1554.59 & 226.51 & 1675.37 & 1325.59 & 2592.55 & 2323.66 & 3462.29 \\ D24 spectral energy & 4.50 & 9.86 & 6.41 & 6.44 & 10.31 & 7.66 & 50.48 \\ Peak-to-peak value & 239.2 & 313.1 & 264.4 & 200.3 & 309.9 & 299.7 & 367.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The optimal eigenvectors for each valve state. were 420 groups data of increasing intake valve clearance (fault 1 and fault 2), 420 groups of increasing exhaust valve clearance (fault 3 and fault 4), and 420 groups of increasing both intake and exhaust valve clearance (fault 5 and fault 6). A total of 360 groups of data are randomly selected as the test set, and the number of each fault state data is 120 groups. The rest of the data was used as a training set. The RF classifier was again constructed using the training set data. Furthermore, the confusion matrix was shown in Table 7.  
According to Table 7, after the system alarms, it could accurately identify the specific fault type of the valve clearance as well. Among them, only nine intake valve clearance faults were diagnosed as other faults, and the recognition rate reached 92.5%.