# Prediction of Building's Thermal Performance Using LSTM and MLP Neural Networks
## 3 Results and Discussion
### Temperatures Analysis  
The analysis of the thermal inertia of the building, for the two samples studied, through the predictions of the indoor temperatures of the building studied, is shown in Figure 5. Specifically, the results of the LSTM models are shown in Figure 5a and the results of the MLP models are shown in Figure 5b. As in the previous section, each time-lag structure studied is represented in the figures through the prediction with the lowest error among the 10 repetitions of the analysis. LSTM models optimally predict the indoor temperatures of the building analyzed in this study. Table 3 shows that average errors (measured by the CV(RMSE)) are below 3% and their variability is small (below 0.005); both for sample 1 and for sample 2. In sample 1 (first row of Figure 5a), contrary to the previous section, the average errors are lower than those of sample 2. Furthermore, the lowest average error of this sample is obtained with the 1-lag structure (CV(RMSE) = 1.89%). In addition, although the models results are stable, this specific architecture shows the smallest standard deviation among all the structures analyzed (see Table 3). In this case, in Figure 5a it is observed that the two architectures with 12 and 24 lags are straight lines. This fact means that the introduction of more time lags does not provide useful information. Although the average error obtained by these two architectures is small, the models do not efficiently adjust to reality. Thus, the architecture that obtains the highest average error is the architecture with 24 lags (CV(RMSE) = 2.68%). Moreover, it is the least stable model structure in relation to the variability of the errors obtained (see Table 3). There is a correlation between the variability of the errors obtained and the average error; the greater the \begin{table}
\begin{tabular}{c|c c c c|c c c c} \hline
**LSTM Model** & **Sample 1** & **Sample 2** & **MLP Model** & **Sample 1** & **Sample 2** \\ \cline{2-9}  & CV RMSE & SD & CV RMSE & SD & & CV RMSE & SD & CV RMSE & SD \\ \multicolumn{9}{c}{No lags} \\ \multicolumn{9}{c}{11 st (20-20-10-10)} \\ \multicolumn{9}{c}{0.05} \\ \multicolumn{9}{c}{12 st (20-20-10-10-1)} \\ \multicolumn{9}{c}{6 lags (10-10-15-5-1)} \\ \multicolumn{9}{c}{19.13v} \\ \multicolumn{9}{c}{0.066} \\ \multicolumn{9}{c}{17.34\%} \\ \multicolumn{9}{c}{0.005} \\ \multicolumn{9}{c}{24 lags (500-800-250-1)} \\ \multicolumn{9}{c}{19.38\%} \\ \end{tabular}
\end{table} 
Table 2: Results of the thermal demand predictions based on the time lags introduced in the neural network model. LSTM errors are presented in the first three columns, whereas MLP errors are presented in the last three. The results shown summarize the 10 repetitions of the experiment, for each architecture and each sample analyzed. The mean of the CV(RMSE) obtained in each of them and the standard deviation (SD) are presented. The different structures of the neural networks that obtain the best accuracy are presented between brackets. variability, the greater the average error. On the other hand, in sample 2 (second row of Figure 5a) the 1-lag structure, as in sample 1, obtained the lowest average error (CV(RMSE) = 2.05%) and the smallest variability (see Table 3). As shown in Figure 5(a), with this sample the different models analyzed show a more similar behavior among themselves than in sample 1. Furthermore, unlike the first sample, the introduction of more time lags in the models eventually reduces the average errors; the best models, are those with 1 and 24 time lags (see Table 3). Therefore, the architecture with the highest average error is the 6-lag architecture (CV(RMSE) = 2.23%). In this case, there is no relation between average error and the variability of the results. MLP models, presented in Figure 5b, once again provide better results than LSTM models. As shown in Table 3, their average errors are less than 2.5% and their variability is below 0.003. In sample 1 (first row of Figure 5b), the model structure with the lowest average error is the 24-lag structure (CV(RMSE) = 1.73%).