## 2 Related Work  
State-of-the-art approaches on data-driven energy prediction are combining machine-learning models to achieve results with better accuracy [19; 20]. Some of the most-used machine-learning algorithms are support vector machines (SVMs) or support vector regression (SVR), neural networks, and more specific recurrent long short-term memory (LSTM). Moreover, some approaches are using other techniques, such as transfer learning, reinforcement learning, and wavelet transform. There are multiple SVM and SVR approaches that achieve high performance in forecasting energy, but the models show poor adaptability to different temporal or spatial granularities, and the predictions are made by using only one single step ahead. in reference [21], the performance of an SVR energy-consumption forecasting model is studied for different times and spatial granularities (e.g., 10 min, hourly, daily, etc.). This paper focuses on how these different data scales impact the prediction accuracy that is made per unit (an independent family from the building), per floor, and the entire building. The best performance was obtained for the predictions with hourly time granularity, whilst the worst was for the unit predictions with a time granularity of 10 min. Another approach is using a multi-SVR weighted model with parameters and weights optimized by a differential evolution algorithm. The solution proposed in reference [22] involves a hybrid forecasting model which can make single-step energy-consumption predictions for a building with a half-hourly and daily time granularity. After the optimization of the SVR models' parameters and their weights, the MAPE (Mean Absolute Percentage Error) obtained on the test set was 5.84% for daily predictions and 3.76% for half-hourly predictions. Hybrid models using long short-term memory (LSTM) with different variations and optimization algorithms for model parameters are used for building energy-consumption forecasting [23]. A model combining long short-term memory recurrent neural network with an Improved Sine Cosine Optimization Algorithm is used in reference [24] for different forecasts' horizons. In this case, the optimization algorithm is used to select the best hyperparameters for the LTSM model. The input and forecast window sizes are adjusted for different scenarios. In reference [25], parallel LSTM neural networks were combined with singular spectrum analysis (SSA) for multiple prediction time intervals, showing high prediction accuracy and computation efficiency. The SSA algorithm is used for data preprocessing, and the energy consumption data are decomposed to obtain more regular time series. The performance is between 4% and 18%. in reference [26], a prediction model is proposed by using unidirectional and bidirectional LSTM models. The bidirectional model has an additional backward pass in which the inputs are processed from future to past. Similarly, a bidirectional LSTM model is proposed in reference [27]. It is combined with a convolutional neural network to forecast building energy for the next hour. Some of the models proposed for energy predictions, such as Elman Neural Networks [28], can store data in memory neurons. An optimized gradient boosting regressor model with a swarm particle optimization was proposed to monthly energy forecasting in reference [29] as a solution for energy prediction to verify the actual monitored values from different prosumers. Deep reinforcement learning was studied in reference [30] for predictions with a horizon of 5 min up to one hour in advance. Another proposed solution for the problem of short-term load forecasting is the Ranger-Based Online Learning Approach [31]. A hybrid approach that combines machine-learning algorithms with stationary wavelet transform was presented in reference [32]. The wavelet transform decomposes the actual monitored data used as input for the machine-learning algorithm, while its inverse is used to reconstruct power values from the predicted ones.