# Machine Failure Prediction Using Survival Analysis
## 5 Results
### Model Training and Results
For the HDF and RNF failure types, the best prediction was achieved by the RSF with a percentage of approximately 99% and 67%, respectively, while for the failure types of OSF and TWF, the COX PH model displayed the best C-index score among all the other models, achieving scores of 99.57% and 96%, respectively. Finally, the RF model produced the best C-index score for the PWF failure type with 99.86%. The numbers discussed are presented in Table 3.  
With the insertion of the feature selection layer, all models increased their predictions in most cases. It is noteworthy that the optimal set of selected features used by the models differed across the various modes of failure. The features used by each model to achieve its best C-index score can be seen in Table 5. All models used on average four features, with the decimal values rounded up to the closest integer because the features cannot be split. One outlier to this was the prediction of TWF, where three out of the four models used two features to achieve their best prediction, while the RF model used all five. The RSF model showed significant improvements in the prediction of TWF (from \(\sim\)54% to \(\sim\)68%) and RNF (from \(\sim\)67% to \(\sim\)76%) types, while also making slightly better predictions on the PWF, OSF, and HDF types. The RF model also improved its results both in the machine failure prediction (increase by \(\sim\)1.1%) and in the prediction of the failure types of RNF, PWF, and OSF. In the case of RNF, the increase was significant as the RF model was almost 10% more accurate using the feature selection. In contrast, the prediction of the TWF and HDF showed a small decrease in accuracy. The COX PH model exhibited improvements in most performance categories, with the exception of PWF, where its performance remained stable, and HDF, where the C-index decreased by 0.0272. The most significant increase was the RNF prediction where the C-index score improved from 39% to 86%, showing a high 119.9% increase. Finally, ST also made major improvements in the prediction of the machine failure, as well as the OSF, PWF, and TWF failure types. It was also the model with the most significant decrease in the C-index score after the feature analysis/selection layer, with the score of HDF decreasing by approximately 31%. Another drop-off was also present in the RNF failure type, although this was less significant. The percentages of increase and decrease in the C-index scores of each model are presented in Table 6.  
Considering all models, the RSF, despite feature selection, did not manage to surpass the results of the RF in the predictions of OSF and PWF, and in the predictions of the COX PH model on the RNF and TWF failure types. Especially in the case of TWF, the difference \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **Machine** & \multirow{2}{*}{**HDF**} & \multirow{2}{*}{**OSF**} & \multirow{2}{*}{**PWF**} & \multirow{2}{*}{**RNF**} & \multirow{2}{*}{**TWF**} \\  & **Failure** & & & & & \\ \hline RSF & 5 & 4 & 5 & 3 & 3 & 2 \\ RF & 3 & 4 & 5 & 2 & 2 & 5 \\ COX PH & 3 & 4 & 5 & 5 & 3 & 2 \\ ST & 5 & 4 & 2 & 5 & 2 & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Number of features each model used to achieve its best prediction on each failure type. remained significant despite the improved accuracy. However, RSF performed better in the overall prediction of failure but also stayed close or performed better than the other models in all cases except TWF.