# Prediction of Building's Thermal Performance Using LSTM and MLP Neural Networks
## 4 Conclusions
Thus, the methodology presented can be applied to evaluate the energy performance or the influence of thermal inertia of different buildings. First, the results show that the black box models yield average prediction errors below the proposed values for considering calibrated models. The results also illustrate the greater accuracy of MLP neural networks in predicting both thermal demand and indoor temperatures. LSTM neural networks, created specifically to model time sequences, show a poorer performance than MLP models due to the peculiarity of this analysis. In this study the models were trained with only two months of data to try to predict future time sequences of the variable of interest. LSTM models are focused on analyses where predictions are made for time sequences immediately consecutive to the training data (as a time series). In this specific case, where the data are not continuous in time, LSTM models are not the most efficient. In this paper it was demonstrated that, for analyses similar to the one presented here, MLP models are more appropriate; they are more flexible if the available data, on the one hand, are not continuous in time or, on the other hand, are very few. In terms of thermal demand predictions, for both sample 1 and sample 2, the best MLP models are better than the best LSTM models. While the average errors of the MLP models were 14.90% and 14.17%, respectively, the average errors of the LSTM models were 15.26% and 14.35%. The same applies to indoor temperature predictions. The average errors of the best MLP models were 1.73% in sample 1 and 1.90% in sample 2, and those of the best LSTM models were 1.89% and 2.05%, respectively. Regarding the variability of the predictions, the results of the LSTM and MLP models are similar, but the MLP models, in most cases, have slightly smaller standard deviations. Furthermore, the results of the thermal inertia analysis of the building are different in relation to the different models used. Although all the analyses show that the introduction of specific time lags reduces the prediction error, the influence of the thermal inertia of the building changes with LSTM and MLP models. In the case of thermal demand analysis, both LSTM and MLP models show the same result. In sample 1 the optimal number of time lags introduced in the model was 6 while in sample 2 the optimal structure was a model with 1 time lag. It was demonstrated that the inertia of the independent variables of these models (indoor temperatures, outdoor temperatures and solar radiation) does not extend too much in time. Differently, the results of LSTM and MLP models do not coincide with the indoor temperatures analysis. LSTM models, both of sample 1 and sample 2, have their optimum in 1 time-lag. In contrast, with MLP models the best structures were 24 time lags in sample 1 and 12 time lags in sample 2. Thus, MLP models are able to better extract the information provided by the introduction of more time lags; they are able to exploit the thermal inertia of the building. From an energy point of view, the conclusion is that the thermal inertia of the building does provide useful information to the machine learning models by introducing lagged variables. This was demonstrated by the decrease, up to a certain limit, of average errors with the introduction of time lags. Therefore, it was also demonstrated that the dimension of the thermal inertia, measured by the maximum number of time lags that provides valuable information, can be detected by the methods presented in this paper. Moreover, the analysis showed that MLP models are more appropriated than LSTM models if the available data set is not large and continuous over time. For the two variables and the two samples analyzed the average error produced by the optimal MLP models are lower than those provide by the optimal LSTM models.