## 4 Results and Discussion
### Fault Classification  
After the detection of a fault, the next step is to identify the type of fault using ML classifiers. In the dataset that was used for fault detection in the previous step, any of the three types of fault are considered under a single class as a fault. In this step, a second dataset is used, in which the injected time steps are labeled according to the type of fault: bias, drift, or stuck. Fault classification performance by the five ML classifiers is presented with confusion matrices in Figure 12. As can be seen from the confusion matrices, every classifier could recognize the stuck fault accurately, but all of them performed poorly in distinguishing between the bias fault and the drift fault. This deterioration in classification performance between these two classes is because of the gradual increase in the drift fault signal, which after a certain point equals the amplitude of the signal during a bias fault. The same signal amplitude makes the signature of both faults similar, and thus, it becomes difficult for the classifier to distinguish between these classes. The corresponding metrics are listed in Table 5 for the fault classification task. Now, to improve fault classification performance, we propose an approach to calculate the feature for more time steps rather than computing features for the prediction horizon of 20 time steps. In the proposed approach, once the presence of a fault is identified by the first classifier, the system will continue to observe the signal for more than 20 time steps and will then extract the selected features for a wider time span. It has been observed that when 100 time steps instead of 20 time steps are considered after the occurrence of a fault, the classifiers can more accurately classify the type of fault with the feature extracted from the extended time steps. The improvement in fault classification is indicated by the confusion matrices in Figure 13.  
Figure 12: Fault classification performance for different classifiers: (**a**) random forest, (**b**) XGBoost, (**c**) SVM, (**d**) KNN, and (**e**) LightGBM. Turning now to the analysis of the second dataset, we focused on applying the same methodology without reapplying SHAP feature selection. This decision was based on our ability to demonstrate that the features selected from the first dataset for the three different types of faults are equally appropriate for the new sensor signals. Therefore, from the  
Figure 13: Improved fault classification performance for different classifiers: (**a**) random forest, (**b**) XGBoost, (**c**) SVM, (**d**) KNN, and (**e**) LightGBM. \begin{table}
\begin{tabular}{c c c c c} \hline \multicolumn{5}{c}{**Random Forest**} \\ \hline  & **Bias Fault** & **Drift Fault** & **Stuck Fault** & **Average** \\ \hline Precision & 64.21\% & 72.48\% & 100\% & 78.90\% \\ Recall & 63.54\% & 73.91\% & 99.04\% & 78.83\% \\ Fl-Score & 63.87\% & 73.19\% & 99.52\% & 78.86\% \\ Accuracy & 81.82\% & 78.89\% & 99.60\% & 86.77\% \\ \hline \multicolumn{5}{c}{**XGBoost**} \\ \hline Precision & 66.32\% & 74.80\% & 100\% & 80.37\% \\ Recall & 66.67\% & 75.10\% & 99.36\% & 80.38\% \\ Fl-score & 66.49\% & 74.95\% & 99.68\% & 80.37\% \\ Accuracy & 83.00\% & 83.27\% & 99.74\% & 88.67\% \\ \hline \multicolumn{5}{c}{**SVM**} \\ \hline Precision & 66.39\% & 65.85\% & 99.68\% & 77.31\% \\ Recall & 42.19\% & 84.58\% & 99.04\% & 75.27\% \\ Fl-score & 51.59\% & 74.05\% & 99.36\% & 75.00\% \\ Accuracy & 79.97\% & 80.24\% & 99.47\% & 86.56\% \\ \hline \multicolumn{5}{c}{**KNN**} \\ \hline Precision & 63.54\% & 71.16\% & 100\% & 78.23\% \\ Recall & 59.90\% & 75.10\% & 99.04\% & 78.01\% \\ Fl-score & 61.60\% & 73.08\% & 99.52\% & 78.07\% \\ Accuracy & 81.16\% & 81.55\% & 99.60\% & 87.44\% \\ \hline \multicolumn{5}{c}{**LightGBM**} \\ \hline Precision & 64.97\% & 74.40\% & 100\% & 79.79\% \\ Recall & 66.67\% & 73.52\% & 99.36\% & 79.85\% \\ Fl-score & 65.81\% & 73.96\% & 99.68\% & 79.81\% \\ Accuracy & 82.48\% & 82.74\% & 99.74\% & 88.32\% \\ \hline \end{tabular}
\end{table}