# Use of Machine Learning Methods for Indoor Temperature Forecasting
## 2 Methodology and Materials
### Selection of Predictive Models
#### 2.3.1 ML Methods  
A variety of ML algorithms are found in the literature. Some of these algorithms (Table 1) have been frequently used and have shown reliable results in predicting buildings' thermal and energy variables. Figure 4: Temperature difference for the groups of sensors located at the same position. Figure 3: Recorded data by groups of sensors located at the same position. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Reference** & **Predicted** & **ML** & **Input** & **Data** & **Key** & **Performance** \\  & **Variables** & **Algorithms** & **Variables** & **Source** & **Finding** & **Evaluation** \\ \hline  & & & Cooling and & & & Mean absolute \\  & & & heating degree day, & & MLR is a & error (MAE), \\  & & & external & & promising & mean square \\  & Building energy & & temperature, shape & Non-residential & alternative in & error (MSE), \\  & needs & (MLR) & factor, opaque & building stock & the field of & RMSE, \\  & & & surface, and & & building energy & mean absolute \\  & & & surface of glazed & & performance & percentage \\  & & & component & & error (MAPE) \\ \hline  & & & Meteorological & & & \\  & Energy & MLP, LR & data, temporal data, & & & \\  & & SVM, GB & appliances, and & Two story & MLP & R\({}^{2}\), \\  & consumption & RF & light energy & building & outperforms all & RMSE, MAE, \\  & & & consumption & & other models & MAPE \\ \hline  & & & MLP, radial & & & \\  & & basis function & & environmental & & \\  & & (RBF), & temperature, & temperature, & & \\  & & group method & outdoor relative & Laboratory of a & MLP achieved & Coefficient of correlation, \\  & temperature & of data & & humidity, wind & university & estimations & RMSE \\  & & handling & & hours, and & & \\  & & (GMDH) & & occupancy & & & \\ \hline  & & MLR, RF & & & & \\  & & MLP, boosting & & & & \\  & & tree (BT) & & & & \\  & & SVR, K-nearest & & & & \\  & & neighbors & Building power & & & The ensemble \\  & Next day daily & (K-NN), & consumption, & & model produces & MAPE, \\  & peak demand & multivariate & meteorological & High-class & better & RMSE, \\  & and & adaptive & data, & skyscraper & generalization & MAE, R\({}^{2}\) \\  & consumption & regression & time of & & performance & \\  & & splines (MARS) & observations, & & & \\  & & autoregressive & & & & \\  & & integrated & & & & \\  & moving average & & & & \\  & & (ARIMA) & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Machine learning-based thermal prediction. Figure 5: Recorded parameters of the heating experiment. An artificial neural network (ANN) is a system whose functioning is inspired by the neurons of the human brain. Multi-layer perception (MLP) is the most popular structure among the forwarding propagation methods in ANN and has been the subject of several types of research. MLP has an input layer, an output layer, and a hidden layer in which each neuron is connected to the mentioned layers. This architecture has been used as a powerful method to predict the indoor temperature and energy consumption of buildings [22; 45; 51] and assess the occupants' thermal comfort [52; 53]. This research started with an MLP model with one hidden layer and four neurons. This number was selected after a set of tests conducted with several neurons ranging from 4 to 10. The study conducted in [51] also supports this number. The training process was carried out by considering the Levenberg-Marquardt algorithm, which has proven to be effective with convergence towards a minimal root mean square [52; 53]. The transfer function sigmoid was used for the hidden layer, while a linear transfer function was used for the output layer. Several tests were carried out to obtain a reliable prediction. These tests were characterized by similar training times. The best prediction was obtained for a test with 32 epochs and four