# A Data-Driven Forecasting Strategy to Predict Continuous Hourly Energy Demand in Smart Buildings
## 4 Results and Discussion
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model 1** & **Model 2** & **p-adj** & **Decision** \\ \hline meanBest & RF & \(1.97\times 10^{-171}\) & True \\ meanBest & TCN & \(9.15\times 10^{-127}\) & True \\ meanBest & TF & \(1.89\times 10^{-56}\) & True \\ meanBest & XGB & \(5.09\times 10^{-102}\) & True \\ RF & TCN & \(1.5\times 10^{-2}\) & True \\ RF & TF & \(1\) & False \\ RF & XGB & \(5.03\times 10^{-14}\) & True \\ TCN & TF & \(8.09\times 10^{-1}\) & False \\ TCN & XGB & \(2.2\times 10^{-2}\) & True \\ TF & XGB & \(7\times 10^{-3}\) & True \\ \hline \hline \end{tabular} p-adj = is the corrected p value using Bonferroni correction; decision = indicates if there is a significant difference.  
\end{table} 
Table 4: ANOVA test results for building 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model 1** & **Model 2** & **p-adj** & **Decision** \\ \hline CNN & meanBest & \(6.32\times 10^{-56}\) & True \\ CNN & TCN & \(7.56\times 10^{-6}\) & True \\ CNN & TF & \(8.53\times 10^{-51}\) & True \\ CNN & XGB & \(3.89\times 10^{-11}\) & True \\ meanBest & TCN & \(4.67\times 10^{-109}\) & True \\ meanBest & TF & \(2.33\times 10^{-195}\) & True \\ meanBest & XGB & \(5.99\times 10^{-254}\) & True \\ TCN & TF & \(2.18\times 10^{-8}\) & True \\ TCN & XGB & \(1\) & False \\ TF & XGB & \(1.89\times 10^{-9}\) & True \\ \hline \hline \end{tabular} p-adj = is the corrected p value using Bonferroni correction; decision = indicates if there is a significant difference.  
\end{table} 
Table 5: ANOVA test results for building 2. As the week progresses, their margin of error decreases, with the days that show the greatest error in the prediction being Sundays and Mondays, due to opposite patterns when using past series values. The behavior by the week of the year presents a greater error from week 30 to week 32, this is because Holy Week does not occur on a particular date of the year, so the models have difficulty in adapting to this change. For the months of the year, it is observed that July and August are where the greatest error occurs since they coincide with the time of year where the university campus is not in its normal operation. Thinking that these events could affect the performance of the models, a variable was considered to measure when the university was in recess, however, the model generated a high error for these events. Figure 7 shows the behavior of both buildings concerning the hours of the prediction and the period of prediction. The hours of prediction correspond to the performance of the proposed strategy with each of the models in each hour of the day, emphasizing that for both buildings the interval between 10 a.m. and 12 p.m. is where the best results are obtained. The period of prediction corresponds to the performance of the strategy as the hours go by, showing that the first hours are the ones that present the least error in the forecast. Figure 6: (**a**) Performance of forecasting models by day, month, and week in building 1; (**b**) performance of forecasting models by day, month, and week in building 2. Figure 8 shows the actual forecast of the assembled model that obtained the best result for each hour of the forecasted year, which in the case of building 1 was the combination of the best five models, while for building 2, it was the combination of the best four models. Figure 7: (**a**) Performance of forecasting models by the hour, and prediction period in building 1; (**b**) performance of forecasting models by the hour, and prediction period in building 2.