## 6 Predictive Model Experimental Results
### Modelling Results  
A particular predictive model has to be developed for different components due to the fact that physical behaviors and thresholds differ from one component to another. Two models with slightly different parameters have been constructed while using Keras library [96] in Python through the sequential model Application Programming Interface (API).  
Given a sequence of train data \(x\) at each time step \(t\); \(x_{t}=(x_{1},x_{2},\ldots,x_{n})\), where \(t=1,2,\ldots n\) and \(x\) is a time step from train data whose arrangement is shown in Figure 13.  
The LSTM performance depends on to the hyperparameters turning. To find the optimal parameter values that result in minimum model loss and improve the model efficiency from overfitting phenomena, at the end of each model hyperparameter turning, the created model is evaluated on both the train and test datasets, and the Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) are calculated using Equations (9) and (10), respectively, and the values are saved.  
\[MAE=\sum_{t=1}^{n}\frac{1}{n}|Y_{t}-\hat{Y}_{t}| \tag{9}\]  
\[RMSE=\sum_{t=1}^{n}\sqrt{\frac{1}{n}(Y_{t}-\hat{Y}_{t})^{2}} \tag{10}\]  
where \(Y_{t}\) and \(\hat{Y}_{t}\) are, respectively, the actual and the predicted value by the model corresponding to \(Y_{t}\) at time step \(t\), \(n\) is the total number of steps of the test set.  
In order to evaluate the model, we iterate the turning different parameters to different values and save the MAE and RMSE scores. By comparing the obtained errors, the minimum model loss that is attained on the hyperparameters values is shown in Table 1.  
Figure 13: Imported Data presentation in Python.  
Table 2 presents the minimum error values as well as model performance accuracy. The test mean absolute error is less than that of training, which is the best for our model.  
Figure 14 shows the training and test loss of our LSTM model at optimal parameter values. We can see that the train and test losses decrease for larger epoch values and that train and test losses both stabilize at closer points. The loss instability in the pump model resulted from data complexity due to the continuous changes of equipment health status.  
Figure 15 shows the actual and predicted results for both the train and test data. For pumps, the actual and predicted results are closer. A slight fluctuation between the actual and predicted values on pump train data is caused by the dropout regularization that is used to reduce the overfitting phenomenon and prediction error to unseen data. The heaters' dispersion results between actual and predicted points are explained by the higher fluctuations of the real data from component.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameters** & **Optimal Model Values for Heaters Dataset** & **Optimal Model Values for Pump Dataset** \\ \hline Train dataset lot & 80\% & 80\% \\ Test dataset lot & 20\% & 20\% \\ Input layer & 1 & 1 \\ LSTM Cells/Units per each & 2 cells/50 units per each & 1 cell / 100 units \\ Activation & Rectified Linear Unit (ReLu) & 0.2 \\ Dropout wrapper & 1 & 1 \\ Optimizer & Adam & Adam \\ Epoch & 20 & 20 \\ Batch sizer & 70 & 70 \\ Look back window & 30 & 30 \\ Loss function & Mean Squared Error (MSE) & MSE \\ \hline \hline \end{tabular}
\end{table}
Table 1: Model parameters optimal values in experiment.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Evaluation Factor** & **First Model for Heaters** & **Second Model for Pumps** \\ \hline Train Mean Absolute Error & 19.699 & 1.624 \\ Train Root Mean Squared Error & 24.895 & 2.830 \\ Test Mean Absolute Error & 17.968 & 1.598 \\ Test Root Mean Squared Error & 22.894 & 2.900 \\ Coefficient of determination (R\({}^{2}\)) & 0.755 & 0.963 \\ Total error loss & 0.096 & 0.04 \\ Accuracy & 90.432\% & 96.0\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Model performance evaluation values.  
Figure 14: Model loss for (**a**): heaters and (**b**): pump models.