## 4 Data-Driven Framework for Building Energy Consumption Prediction
### Model for Prediction
#### 4.4.4 Lstm  
Deep learning algorithms, compared to traditional predictive algorithms such as ANN and SVR, exhibit a more intricate structural framework. This characteristic endows them with the capability to uncover deeper, more intricate relationships between building energy loads and their associated variables, resulting in a notable enhancement in prediction accuracy under specific conditions. Numerous studies have corroborated this viewpoint: [PERSON] et al. [41] found that factorized conditional restricted boltzmann machines (FCRBMs) outperformed other algorithms in terms of prediction precision when comparing various deep learning and traditional machine learning algorithms for electric load forecasting. Meanwhile, [PERSON] et al. [163] demonstrated the advantages of RNN in heating and cooling load predictions compared to SVR. LSTM networks, as the preeminent deep learning approach for handling time-series data, have further elevated predictive performance by addressing the common issues of gradient vanishing or exploding encountered in RNNs [164]. The schematic diagram of the information flow in LSTM networks  
Figure 13: The structure of MLP [31]. is shown in Figure 14. [PERSON] et al. [165] demonstrated the precision of LSTM models in predicting daily energy consumption in institutional buildings, verifying LSTM's excellence in reducing RMSE compared to SVR and Gaussian process regression (GPR). Additionally, LSTM variants such as coupled input and forget gate (CIFG) and gated recurrent unit (GRU) have been widely applied and validated in practice. RNNs have unique advantages in processing time-series data, and the introduction of the gating mechanism further enhances the performance of RNNs, making them more suitable for tasks such as building energy consumption predictions that require a high degree of time-series dependence. LSTM, as a variant of RNN, effectively solves the problems of gradient vanishing or explosion in traditional RNN by introducing input gates, forget gates, and output gates. The input gate determines how much of the current input information will be added to the memory cell; the forget gate controls how much of the information in the memory cell from the previous time step will be retained to the current time step; and the output gate decides how much of the information in the memory cell will be output for the prediction at the current time step. For example, in building energy consumption prediction, LSTM can use these gating mechanisms to dynamically adjust the degree of memory and forgetting of information at different time steps based on historical energy consumption data and current influencing factors (such as meteorological data, building usage, etc. ), thus more accurately capturing the long-term dependencies of energy consumption data. To further elevate prediction accuracy and overcome the limitations of single technologies, researchers have explored the application of hybrid strategies. A novel hybrid model integrating bidirectional long short-term memory (Bi-LSTM), CNN, and grey wolf optimizer (GWO) has been proposed. In this model, GWO optimizes the parameters of CNN and Bi-LSTM, while one-dimensional CNN effectively captures the features of time-series data. Validated using data from four buildings with distinct characteristics, this model has exhibited outstanding predictive performance [167]. Moreover, to tackle the challenge of over-fitting, [PERSON] et al. [168] developed a composite framework based on LSTM and feedforward neural networks (FFNNs), specializing in individual consumer energy forecasting, which effectively improved prediction accuracy. Additional research has devised nine distinct deep learning frameworks for forecasting the energy demand of five buildings located in various geographical regions, from one hour to one day ahead, showcasing the wide applicability and robustness of deep learning technologies in diverse building energy prediction scenarios [169].