## 6 Results and Discussion  
This study was developed with the objective of building a DL model based on LSTM that allows forecasting of the daily energy consumption of the HVAC system in buildings. For this, it has been applied specifically to a heat pump in a historic building, the Teatro Real in Spain. Another purpose was to evaluate the best configuration of this model by using different time lags, various HP tuning, and implementation of the dropout and early stopping regularization techniques during the training of the model. Analyzing the performance obtained, it can be seen in Tables 4-7, that all the configurations showed good precision in forecasting the short-term energy consumption of the building's heat pump, given that they obtained values within the range of 0.197-0.285 of CVRMSE, the metric used by ASHRAE, IPMVP, and FEMP to validate the accuracy of a forecast model [93; 94; 95; 96]. Although the results show that any configuration of the proposed model can be used, this does not imply that the models generalize correctly. For this reason, we analyzed and evaluated all the configurations that provided the best results in all the accuracy evaluation metrics (see Equations (7)-(9)), to identify and obtain the model with the best values of time lags, HPs tuning, and goodness of the regularization techniques. Taking into account these considerations, as seen in Tables 4-7, all configurations for a time lag of seven days obtained good results according to the evaluation consideration. Furthermore, for the C1, C3, and C4 configurations, better results were obtained with a _Tanh_ activation function of 50 neurons (T50). C1 proposed configuration obtained R\({}^{2}\), RMSE and CVRMSE values of 0.876, 18.61 and 0.205, respectively; C3 configuration obtained R\({}^{2}\), RMSE, and CVRMSE values of 0.886, 17.88 and 0.197, respectively; C4 configuration obtained R\({}^{2}\), RMSE, and CVRMSE values of 0.879, 18.37, and 0.202, respectively. Finally, C2 configuration obtained better results with a _Tanh_ activation function of 60 neurons (T60), in which it achieved R\({}^{2}\), RMSE, and CVRMSE values of 0.877, 18.56, and 0.204, respectively. From the results shown above we can highlight several interesting findings. First, to perform a daily forecast in this case study, it was necessary to apply seven-day historical time lags. The HVAC system of a house only uses the historical behavior of the previous day to forecast the next day as there are few temporal variations throughout a week [4]. In contrast, a complex building such as the one studied here presents many disturbances during the week (e.g., occupant behavior, building use, work time, theatrical performances, events, etc.). The use of seven days of history offers the opportunity to capture these disturbances, making it feasible to anticipate the energy consumption of the HVAC system for the next day with adequate accuracy and favors the implementation of applications such as optimal control, preventive maintenance and fault detection, and diagnosis [57; 58; 59]. Regarding the second finding, the configurations obtained (C1-C4) achieved a good performance in the CVRMSE metric, which was between 0.095 and 0.103, less than that proposed of 0.30 by international agencies. Other significant findings of the results obtained were the activation function and the number of neurons for the LSTM layer. In the first finding, the best results obtained using the activation function _Tanh_ versus _SeLu_ are highlighted. One justification for this is that, while _SeLu_ has the ability to avoid vanishing or exploding gradient problems, it is not able to hold the gradient for a long period of time before it reaches zero, a property that _Tanh_ can solve by calculating its second derivative [29; 84; 99]. In the second finding, the number of neurons evaluated in this study for the LSTM layer was 50, 60, and 70 neurons, in which three model configurations, C1, C3, and C4, performed well with only 50 neurons, whereas the C2 configuration performed better with 60 neurons.