# Use of Machine Learning Methods for Indoor Temperature Forecasting
## 3 Results and Discussion  
The tested algorithms' performance has been evaluated using the coefficient of determination (R\({}^{2}\)), and the root mean square error (RMSE). The obtained values are illustrated in Table 3. This part focuses on the results of the prediction of the temperature at the center of the room only, since similar results were obtained for the prediction of the temperature of the internal faces of the walls. The used ML algorithms have been sorted in decreasing order based on their performance in each experiment, in other words, by increasing RMSE and decreasing R\({}^{2}\), as shown in Figure 7.  
The proposed algorithms have shown their efficiency in the prediction of the indoor temperature of the room, given the values of the performance indices (RMSE <1 and R\({}^{2}\) > 0.8) [47; 77]. Even though these algorithms seem powerful, they do not all have the same prediction accuracy. In fact, the best result for predicting the indoor temperature was provided by the ANN (RMSE = 0.081 and R\({}^{2}\) = 0.99965) and ET (RMSE = 0.159 and R\({}^{2}\) = 0.99864) algorithms. Boosting algorithms (GB and XGB) have shown fairly close performance. DT, RF, and MLR were less high performing than the previous algorithms despite the acceptable values of the performance criteria. \begin{table}
\begin{tabular}{c c c} \hline \hline
**ML Algorithms** & **RMSE** & **R\({}^{2}\)** \\ \hline ANN & 0.081 & 0.99965 \\ \hline MLR & 0.332 & 0.99415 \\ \hline DT & 0.268 & 0.99618 \\ \hline RF & 0.295 & 0.99539 \\ \hline ET & 0.159 & 0.99864 \\ \hline GB & 0.218 & 0.99748 \\ \hline XGB & 0.229 & 0.99721 \\ \hline GBM & 0.842 & 0.96237 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Prediction performance of predictive models. Figure 7: Performance criteria of ML algorithms (RMSE and R\({}^{2}\) coefficient). The RC model also exhibited acceptable values of performance criteria (RMSE < 1 and R2 > 0.8). These are compared to those of the ML algorithms in Figure 8, which illustrate the ranking of the gray box model against the lower- and the best-performing ML algorithms. This figure shows that the AI-based algorithms outperformed the gray box model in predicting the indoor temperature. The lower-performing algorithm MLR (Figure 6) showed improved performance criteria values (RMSE = 0.332 and R2 = 0.99415) compared to those of the RC model (RMSE = 0.842 and R2 = 0.96237). The results of this research were compared to other investigations in the literature. [65] compared the performance of 20 families of ML methods in predicting the indoor temperature of an intelligent building. The ET algorithm provided the best performances. This research partially agrees with this study: the ET method was among the best performing methods, but the ANN model outperformed the ET method. [PERSON] and [PERSON] [78] compared three data-driven models, a linear black-box model (ARX), a non-linear black-box model (ANN), and a gray box model in predicting the indoor temperature of a single-zone house. The performance of the gray box model was intermediate between the other two models. Our research also confirms the improved performance of the ANN and the linear black-box models over the gray box model. Indeed, in our study, even the simple MLR model outperformed the gray box model. Our study compared the two aspects of the data-driven approach (black and gray box models) on their abilities to provide a reliable prediction of indoor temperature. It employed emerging predictive models in a straightforward manner using a limited number of input parameters necessary to achieve accurate prediction results. The obtained results were based on a heating experiment conducted in a closed room in a laboratory environment. This comparison is helpful as it provides a preliminary idea of the most relevant model in indoor temperature prediction that can be employed in energy system management strategies aimed at improving the energy performance of existing buildings.