# Adaptive Imputation of Irregular Truncated Signals with Machine Learning
## 4 Results  
In this section, the results of our adaptive imputation system and subsequent ML-based fault diagnosis are described. To properly assess performance, the selection of appropriate metrics is important. To evaluate the imputation system, we use the mean absolute error (MAE) and root mean squared error (RMSE). For the fault diagnosis system, we use the accuracy metric. These metrics are defined and the equations are given below. * MAE--The average of the absolute differences between the predicted values (\(\hat{y}_{i}\)) and the actual values (\(y_{i}\)) for a number of observations \(n\). \[\text{MAE}=\frac{1}{n}{\sum_{i=1}^{n}}{|y_{i}-\hat{y}_{i}|}\] (1)
* RMSE--the square root of the average of the squares of the differences between actual (\(y_{i}\)) and predicted (\(\hat{y}_{i}\)) values for a number of observations \(n\). \[\text{RMSE}=\sqrt{\frac{1}{n}}{\sum_{i=1}^{n}}{(y_{i}-\hat{y}_{i})^{2}}\] (2)
* Accuracy--the proportion of correct predictions among the total number of predictions. \[\text{Accuracy}=\frac{\text{correct predictions}}{\text{total predictions}}\] (3)  
Table 5 shows the results of the adaptive imputation system across low, moderate, high, and very high levels of missingness. The results are given for 1%, 10%, 11%, 30%, 31%, 50%, 51%, and 90% missing data, the first and last percentage for each interval. For each test, the MAE and RMSE were taken in each individual feature to ensure the most accurate results. For these results, the MAE and RMSE values were normalized against the range of the original data to ensure that the values could be easily presented as a percentage between 0 and 100. Table 6 reports the accuracy metric for the RF classifier on the full synthetic dataset to provide a baseline to compare against for when the classifier is trained on the imputed dataset. The accuracy is reported for both the 'Status' and the 'Error_Code' feature, to test the performance of the classifier at identifying two different types of data that is importantfor fault diagnosis: the condition of the machine and the type of fault itself. Table 7 reports the accuracy of the RF classifier for these two features on missing data percentages of 1%, 10%, 11%, 30%, 31%, 50%, 51%, and 90% for MCAR, MAR, and MNAR data. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Feature** & **1\%** & **10\%** & **11\%** & **30\%** & **31\%** & **50\%** & **51\%** & **90\%** \\ \hline \multicolumn{10}{c}{**MCAR**} \\ \hline Status & 99.12\% & 92.11\% & 89.84\% & 70.98\% & 77.12\% & 63.82\% & 64.84\% & 58.55\% \\ \hline Error\_Code & 98.61\% & 89.04\% & 87.57\% & 63.74\% & 66.81\% & 45.69\% & 46.78\% & 20.69\% \\ \hline \multicolumn{10}{c}{**MAR**} \\ \hline Status & 99.56\% & 97.73\% & 97.59\% & 94.15\% & 94.37\% & 90.94\% & 90.79\% & 83.26\% \\ Error\_Code & 99.34\% & 97.59\% & 97.44\% & 94.01\% & 93.93\% & 90.42\% & 90.42\% & 82.89\% \\ \hline \multicolumn{10}{c}{**MNAR**} \\ \hline Status & 99.27\% & 95.18\% & 94.59\% & 89.40\% & 94.66\% & 90.20\% & 89.91\% & 82.24\% \\ Error\_Code & 98.90\% & 93.27\% & 92.84\% & 83.26\% & 90.28\% & 85.75\% & 85.38\% & 73.76\% \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Classification results after adaptive imputation.