## 5 Results and Discussion
### Fault Prediction Phase
#### 5.1.1 Prediction and Evaluation Index  
Prediction evaluation indexes are used to measure the performance and accuracy of machine learning models in prediction tasks. The selection of appropriate evaluation indexes needs to consider the characteristics of tasks, data distribution, and model objectives. Appropriate evaluation indicators can help us understand the performance of models and carry out model selection, tuning, and comparison. The following are the types of prediction evaluation indicators selected.  
1. Mean square error (MSE)  
\[\text{MSE}=\frac{1}{m}{\sum_{i=1}^{m}}(y_{i}-\hat{y}_{i})^{2} \tag{40}\]  
where \(y_{i}-\hat{y}_{i}\) is the true-predicted value on the test set.  
The range of MSE is [0, +\(\infty\)), which is equal to 0 when the predicted value is exactly consistent with the true value, that is, the perfect model. The greater the value, the greater the error, and the smaller the value, the more accurate the machine learning network model.  
2. Root mean square error (RMSE)  
\[\text{RMSE}=\sqrt{\frac{1}{m}{\sum_{i=1}^{m}}(y_{i}-\hat{y}_{i})^{2}} \tag{41}\]  
\[\text{RMSE}=\text{sqrt}\] (MSE)  
The root mean square error is a measure of the difference between the observed value and the true value. Similarly to MSE, the smaller the gap between our predicted value and the true value, the higher the accuracy of the model.  
3. Mean absolute error (MAE)  
\[\text{MAE}=\frac{1}{m}{\sum_{i=1}^{m}}|(y_{i}-\hat{y}_{i})| \tag{42}\]  
The range of MAE is [0, +\(\infty\)) and, like MSE and RMSE, when the difference between the predicted value and the true value is smaller, the model is better; conversely, the model is worse.  
4. Mean absolute percentage error (MAPE)  
\[MAPE=\frac{100\%}{n}{\sum_{i=1}^{m}}\left|\frac{y_{i}-\hat{y}_{i}}{y_{i}}\right| \tag{43}\]  
The range of MAPE is [0, +\(\infty\)), where a MAPE of 0% indicates a perfect model and a MAPE greater than 100% indicates a poor model.  
5. R-squared (\(R^{2}\))  
\[R^{2}=\frac{{\sum_{i}}(\hat{y}_{i}-\overline{y}_{i})^{2}}{{\sum_{i}}(y_{i}- \overline{y}_{i})^{2}}=1-\frac{{\sum_{i}}(y_{i}-\hat{y}_{i})^{2}}{{\sum_{i}}( y_{i}-\overline{y}_{i})^{2}} \tag{44}\]  
where the numerator part represents the sum of squared variances of the true value and the predicted value, which is like the mean square variance (MSE). The denominator partrepresents the sum of the square variance of the true value and the mean, similar to the variance Var.  
The value range of R-squared is [0, 1]. If the value is 0, the model fitting effect is poor. If the value is 1, the model is error-free. The larger the R-squared, the better the model fitting effect. R-squared reflects the approximate accuracy, because with the increase in the number of samples, R-squared will inevitably increase, and the accuracy cannot be truly quantified, only the approximate quantity can be found.  
6. Explained variance score (EVS)  
\[EVS=1-\frac{Var\Big{(}y_{i}-\overset{\sim}{y}_{i}\Big{)}}{Var(y_{i})} \tag{45}\]  
where Var represents variance.  
EVS is an indicator used to evaluate the performance of a regression model, which measures the degree of explanatory variance of the model for the target variable. EVS ranges from \([-\infty,1]\). The closer the value is to 1, the better the explanatory ability of the model. If EVS is 1, it means that the model perfectly explains the variability of the target variable. If EVS is negative, it means that the performance of the model prediction is worse than simply averaging.