## 3 Results
### Comparative Analysis of Machine Learning Results  
The results of the LSTM model are compared to two machine learning algorithms and one deep learning algorithm tested against the same dataset to evaluate the efficiency of the proposed model. In the selected model to compare the obtained errors, the minimum model loss that is attained on the hyperparameter values is shown in Table 4. Table 5 presented the experimental results.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Optimal Model Values for Occupancy Dataset** \\ \hline Train dataset lot & 70\% \\ Test dataset lot & 30\% \\ Input layer & 1 \\ LSTM cells & 2 cells \\ Activation function & Rectified Linear Unit (ReLu) \\ Dropout wrapper & 0.4 \\ Dense Layer & 1 \\ Optimizer & Adam \\ Number of Epochs & 50 \\ Batch size & 100 \\ Look back window & 8 \\ Loss function & MAE \\ \hline \hline \end{tabular}
\end{table}
Table 4: Model parameters optimal values in the experiment.  
Figure 12 shows the training and test loss of the proposed LSTM model at optimal parameters values described in Table 4. The diagrams show that the train and test losses decrease for larger epoch values and that train as well as test losses both stabilize at closer points. The loss instability in the occupant model resulted from data complexity due to the continuous changes of light intensity during one or more combinations of the daylight or/and the windows open.  
Figure 13 describes the actual and predicted values of the selected parameters such as temperature, humidity, CO\({}_{2}\), and light from the LSTM model described in Figure 6. As shown on the legends the true values are in orange while the predicted values are in blue.  
Table 5 presents the comparative minimum error values as well as model performance accuracy of the proposed model with other models (Naive Bayes Classifier, Support Vector Machine, and Multilayer Perceptron Feed Forward Network). The results show that LSTM has a high accuracy compared to other models and the error values are minimized in comparison to them.  
Figure 14 presents the result showing that LSTM performs well compared to other methods.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Approaches** & **Accuracy** & **MAE** & **RMSE** & **R\({}^{2}\)** & **SD** \\ \hline LSTM & 0.968 & 0.02317 & 0.08397 & 0.9566 & 0.347 \\ Naïve Bayes Classifier & 0.867 & 0.13294 & 0.36461 & 0.0908 & 0.4626 \\ Support Vector Machine & 0.822 & 0.17785 & 0.42172 & \(-\)0.2163 & 0.0000 \\ Multilayer Perceptron FFN & 0967 & 0.03193 & 0.17871 & 0.7815 & 0.44669 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Performance measure values.  
Figure 13: Actual and predicted results: (**a**) for temperature, (**b**) for humidity, (**c**) for CO\({}_{2}\) and (**d**) for light models.  
In Figure 14, the LSTM network presents better performance than the other selected algorithms namely, Naive Bayes, Support Vector Machine, and Multilayer Perceptron Feed-Forward Network in all error measures. The predicted RMSE of those compared machine learning algorithms is 0.36, 0.42, and 0.17 respectively, while the predicted RMSE of the proposed model is 0.083. The prediction result of those compared machine learning algorithms enhances by 77.57%, 80%, and 53.37% respectively compared to the deep learning recurrent neuron network LSTM model. While the root means squared error (R2) of the LSTM model is 96% indicating to be amongst the best. The support vector machine algorithm is showing the worse results that seem like it is not responding to the data set parameters used in this research. Multilayer Perceptron FFN results are presentable with its accuracy almost similar to LSTM as both algorithms for deep learning algorithms use a feed-forward network to train the data. The Standard deviation comparisons also confirm LSTM to provide the least deviated predicted values.