Method for improving lstm interpretability and building energy consumption prediction accuracy
By analyzing the feature contribution of the Long Short-Term Memory Network model through the spatial-temporal layer-by-layer correlation propagation method, the interpretability and accuracy issues of the model in building energy consumption prediction are solved, and the interpretation of feature contributions and prediction accuracy are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV OF SCI & TECH
- Filing Date
- 2022-06-29
- Publication Date
- 2026-05-12
AI Technical Summary
Long Short-Term Memory (LSTM) network models suffer from low interpretability and high complexity in building energy consumption prediction, making it difficult for professionals to understand the model's reasoning mechanism and reducing their trust in the predictions.
The spatial-temporal layer-by-layer correlation propagation method is adopted to quantitatively analyze the contribution of the temporal and spatial dimensions of the input data to the final building energy consumption prediction, eliminate features with low correlation, and improve the interpretability and prediction accuracy of the model.
It increases the interpretability of the model, enabling the assignment of a relevance score to each feature, explaining its contribution to the final decision, and improving prediction accuracy by eliminating unimportant features, thereby reducing the root mean square error.
Smart Images

Figure CN115222110B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building energy consumption prediction technology, specifically to a spatial-temporal layer-by-layer correlation propagation method for improving the interpretability of long short-term memory network models and the accuracy of building energy consumption prediction. Background Technology
[0002] Over the past few decades, building energy consumption has increased dramatically due to population growth, rising demands for building functions, and global climate change. Building energy consumption accounts for an average of 30% of global energy consumption. Building energy consumption forecasting has long been considered a crucial and challenging task by industry and academia. Accurate building energy consumption forecasting can provide effective guidance for energy resource allocation, the development of energy-saving measures, and the improvement of energy systems.
[0003] With the advent of the big data era, data-driven approaches (such as artificial neural networks, support vector machines, random forests, and deep neural networks) have become increasingly important methods in building energy management systems, demonstrating high computational efficiency.
[0004] Long Short-Term Memory (LSTM) network models are widely used for time series forecasting problems. Although LSTM models have been extensively applied to building energy consumption forecasting and have achieved high prediction accuracy, their multi-layered and nonlinear structure makes it difficult to gain in-depth insights into the underlying physical characteristics of the monitored system. Furthermore, they are opaque and untraceable in their predictions, often considered a "black box" method. For building professionals, fully understanding the learned inference mechanisms and trusting the predictions made is a significant challenge because the developed models typically exhibit high complexity and low interpretability.
[0005] Traditional interpretable models do not quantitatively analyze the contribution of input data to the final prediction. To address this, some scholars have proposed a layer-by-layer correlation propagation method, assigning a correlation score to each feature to assess the degree of contribution of each feature to the final decision.
[0006] Accurate building energy consumption forecasting can provide effective guidance for energy resource allocation, the formulation of energy-saving measures, and the improvement of the energy system. Currently, while machine learning is becoming increasingly powerful, the developed models, especially artificial neural networks such as Long Short-Term Memory (LSTM) networks, are becoming increasingly complex, leading to lower model interpretability. The complex reasoning mechanisms behind machine learning make the models incomprehensible to ordinary building professionals, thus reducing their trust in the predictions made.
[0007] Therefore, this invention aims to propose a method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction, in order to solve the above-mentioned problems. Summary of the Invention
[0008] The purpose of this invention is to address the aforementioned problems by providing a method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction. This invention quantitatively analyzes the contribution of the temporal and spatial dimensions of the input data to the final building energy consumption prediction, increasing the model's interpretability while fully preserving its expressive power. For each data instance, the method assigns a relevance score to each feature, thereby explaining the contribution of each feature to the final decision and increasing confidence in the predictions. Finally, by eliminating features with low relevance, the accuracy of building energy consumption prediction using the Long Short-Term Memory (LSTM) network model is improved.
[0009] To achieve the above objectives, the technical solution of the present invention is as follows: A method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction, comprising the following steps:
[0010] S1. Analyze the spatial dimension, that is, the impact of different variables on the final prediction result:
[0011] A. Preprocess the raw data. After preprocessing, the raw data contains all the data of M spatial variable features within N hours and forms an N×M matrix.
[0012] B. Divide the preprocessed data into a training set and a test set. The training set data is used to train the long short-term memory network model, and the trained model is used in the test set to generate preliminary prediction values.
[0013] C. The generated predicted values are processed by the spatial-temporal layer-by-layer correlation propagation method. The spatial-temporal layer-by-layer correlation propagation method returns a matrix of the same size as the input data for each predicted value. Then, the matrix is summed column by column and the average value is taken to obtain a 1×M vector. This vector represents the correlation between the input spatial variable features and the predicted values.
[0014] D. Remove the spatial variable feature with the lowest correlation. Input the data after removing this spatial variable feature into the Long Short-Term Memory Network Model 1 to output the predicted value. Analyze the prediction result using the root mean square error (RMSE) coefficient of variation as an evaluation index, and then compare the result with the initially obtained predicted value. If the RMSE coefficient of variation of the prediction result obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is large, directly output the label of the removed spatial variable feature and the optimal RMSE coefficient of variation value; if the RMSE coefficient of variation of the prediction result obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is small, further remove other spatial variables. The variable features are defined as follows: the input data contains all data of M-1 variables within N hours, and then the training set and test set are divided through steps B to C to train the Long Short-Term Memory Network Model 2 to generate predicted values. Then, the spatial-temporal layer-by-layer correlation propagation method is used to remove one other parameter variable until the root mean square error of the prediction result obtained by the spatial-temporal layer-by-layer correlation propagation method is greater than the root mean square error of the prediction result obtained by the original Long Short-Term Memory Network Model. The labels of the removed i parameter variables and the optimal root mean square error value are output, so as to optimize the prediction performance of the Long Short-Term Memory Network.
[0015] S2. Analyze the time dimension, i.e., the impact of different number of hours on the final result:
[0016] 1) After removing i = a parameter variables in step S1, the input data consists of all the data of (Ma) parameter variables within N hours, forming an N×(Ma) matrix;
[0017] 2) Divide the data into a training set and a test set. The training set data is used to train the Long Short-Term Memory Network Model 1, and the trained model is used in the test set to generate preliminary prediction values.
[0018] 3) The generated predicted values are processed by the spatial-temporal layer-by-layer correlation propagation method. The spatial-temporal layer-by-layer correlation propagation method returns a matrix of the same size as the input data for each predicted value. Then, the matrix is summed row by row and the average is taken to obtain an N×1 vector, which represents the correlation of the time dimension features with the predicted values.
[0019] 4) Remove the least relevant time dimension feature. Input the data after removing this time dimension feature into the Long Short-Term Memory Network Model 2 to output predicted values. Analyze the prediction results using the root mean square error (RMSE) coefficient of variation as an evaluation index, and then compare the results with the initial predicted values. If the RMSE coefficient of variation of the prediction results obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is large, directly output the label of the removed time dimension feature and the optimal RMSE coefficient of variation value. If the RMSE coefficient of variation of the prediction results obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is small, further remove other time dimension features. The input data contains all data of (Ma) spatial variable features within N-1 hours. After steps 2) and 3), the data is divided into training and testing sets, and a long short-term memory network model is trained to generate predicted values. Then, the data is processed by the spatial-temporal layer-by-layer correlation propagation method to remove one other variable until the root mean square error of the predicted result obtained by the spatial-temporal layer-by-layer correlation propagation method is greater than the root mean square error of the predicted result obtained by the original long short-term memory network model. The j removed time dimension feature labels and the optimal root mean square error value are output, ultimately achieving the goal of optimizing the prediction performance of the long short-term memory network model.
[0020] Furthermore, in step B, the ratio of the training set to the test set is η:1-η.
[0021] Furthermore, in step 2), the ratio of the training set to the test set is η:1-η.
[0022] Furthermore, step A involves preprocessing the raw data, including missing value imputation, normalization, and sliding window processing. Missing value imputation uses the commonly used random forest imputation method; normalization uses maximum-minimum normalization; and sliding window processing uses historical measurements from the previous 24 hours as input data, then slides the window forward one step until all data is input.
[0023] Compared with existing technologies, the beneficial effects of this solution are:
[0024] 1. The method of the present invention can increase the interpretability of the model while fully preserving its expressive power. For each data instance, the method of the present invention can assign a relevance score to each feature, thereby explaining the degree of contribution of each feature to the final decision. Finally, by removing features with low relevance, the accuracy of building energy consumption prediction of the long short-term memory network model is improved.
[0025] 2. The spatial-temporal layer-by-layer correlation propagation method used in this invention has stronger feature recognition capabilities and can identify the importance of the temporal and spatial dimensions of the input data based on the spatial-temporal layer-by-layer correlation propagation method. In this invention, the preprocessed raw data contains all data of 9 spatial variable features within 24 hours and forms a 24×9 matrix. In the spatial dimension, when the least important variable is removed, the root mean square error coefficient decreases by 1.55%. In the temporal dimension, when the least important time data is removed, the root mean square error coefficient decreases by 0.13%. The spatial-temporal layer-by-layer correlation propagation method used in this invention has great potential in improving the transparency of the "black box" of neural networks. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of a long short-term memory network in an embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram illustrating the application of the spatial-temporal layer-by-layer correlation propagation method in explaining long short-term memory networks in an embodiment of the present invention.
[0028] Figure 3 This is a flowchart of step one of the embodiments of the present invention, analyzing the impact of spatial dimension on the final prediction result;
[0029] Figure 4 This is a flowchart illustrating the impact of step two, analyzing the time dimension on the final prediction result, in an embodiment of the present invention.
[0030] Figure 5 This is a correlation score diagram of nine variables based on the space-time layer-by-layer correlation propagation method in this embodiment of the invention;
[0031] Figure 6 This is a correlation score diagram of eight variables based on the space-time layer-by-layer correlation propagation method in this embodiment of the invention;
[0032] Figure 7 This is a graph showing the change in prediction error after removing one or two variables in an embodiment of the present invention.
[0033] Figure 8 This is a correlation score graph of the time dimension after removing one variable based on the space-time layer-by-layer correlation propagation method in this embodiment of the invention. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present invention, the technical solution of the present invention will be described in further detail below with reference to the embodiments and accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort should fall within the scope of protection of the present invention.
[0035] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the embodiments.
[0036] Example:
[0037] like Figure 3 and Figure 4 As shown, a method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction includes the following steps:
[0038] Step 1: Analyze the spatial dimension, that is, the impact of different variables on the final prediction result:
[0039] A. Preprocess the raw data (preprocessing of raw data includes missing value imputation, normalization and sliding window processing, etc.). After preprocessing, the raw data contains all the data of 9 parameter variables within 24 hours and forms a 24×9 matrix.
[0040] B. Divide the preprocessed data into a training set and a test set. The training set data is used to train the LSTM model, and the trained model is used in the test set to generate preliminary prediction values.
[0041] C. The generated predicted values are processed by the spatial-temporal layer-by-layer correlation propagation method. The spatial-temporal layer-by-layer correlation propagation method returns a matrix of the same size as the input data for each predicted value. Then, the matrix is summed column by column and the average is taken to obtain a 1×9 vector.
[0042] D. Remove the spatial feature variable with the lowest correlation. Input the data after removing this spatial feature variable into the Long Short-Term Memory (LSTM) network model to output predicted values. Analyze the prediction results using the root mean square error (RMSE) coefficient of variation as an evaluation index, and then compare the results with the initial predicted values. If the RMSE coefficient of variation of the prediction results obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is large, directly output the label of the removed parameter variable and the optimal RMSE coefficient of variation value; if the RMSE coefficient of variation of the prediction results obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is small... Then, other parameter variables are further removed. The input data contains all data of 8 variables within 24 hours. After steps B to C, the training set and test set are divided and the long short-term memory network model is trained to generate predicted values. Then, the spatial-temporal layer-by-layer correlation propagation method is used to remove one other parameter variable. This process continues until the value of the root mean square error of the prediction result obtained by the spatial-temporal layer-by-layer correlation propagation method is greater than the value of the root mean square error of the prediction result obtained by the original long short-term memory network model. The labels of the removed i parameter variables and the optimal root mean square error value are then output.
[0043] Step 2: Analyze the time dimension, i.e., the impact of different number of hours on the final result:
[0044] 1) After removing the i parameter variables in step S1, the input data consists of all the data of the (9-i) parameter variables within 24 hours, forming a 24×(9-i) matrix;
[0045] 2) Divide the data into a training set and a test set. The training set data is used to train the long short-term memory network model, and the trained model is used in the test set to generate preliminary prediction values.
[0046] 3) The generated predicted values are processed by the spatial-temporal layer-by-layer correlation propagation method. The spatial-temporal layer-by-layer correlation propagation method returns a matrix of the same size as the input data for each predicted value. Then, the matrix returned by the spatial-temporal layer-by-layer correlation propagation method is summed row by row and averaged to obtain a 24×1 vector.
[0047] 4) Remove the least relevant time dimension feature. Input the data after removing this time dimension feature into the Long Short-Term Memory (LSTM) network model to output predicted values. Analyze the prediction results using the root mean square error (RMSE) coefficient of variation as an evaluation index, and then compare the results with the initial predicted values. If the RMSE coefficient of variation of the prediction results processed by the spatial-temporal layer-by-layer correlation propagation method is large, directly output the label of the removed time dimension feature and the optimal RMSE coefficient of variation value. If the RMSE coefficient of variation of the prediction results processed by the spatial-temporal layer-by-layer correlation propagation method is small, further remove other time dimension features. The input data contains all data of (9-i) parameter variables within 23 hours. After steps 2) and 3), the data is divided into training and testing sets, and a long short-term memory network model is trained to generate predicted values. Then, the data is processed by the spatial-temporal layer-by-layer correlation propagation method to remove one other variable until the root mean square error of the prediction result obtained by the spatial-temporal layer-by-layer correlation propagation method is greater than the root mean square error of the prediction result obtained by the original long short-term memory network model. The j removed time variable labels and the optimal root mean square error value are output, ultimately achieving the goal of optimizing the LSTM prediction performance.
[0048] In step B, the training set accounts for 70% of the total data, and the test set accounts for 30%. In step 2), the training set accounts for 70% of the total data, and the test set accounts for 30%.
[0049] In existing technologies, Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network structure capable of learning long-term dependencies, such as... Figure 1 As shown. Long Short-Term Memory (LSTM) networks can avoid the vanishing or exploding gradient problem. LSTM networks are suitable for predicting time series data. The output at each time step is based on the input data X. T (Current Information), Hidden Status h T-1 (Short-term memory) and cellular state c T-1 (Long-term memory). Three gate units are designed within the long short-term memory network to guide information flow: the forget gate, the input gate, and the output gate. The forget gate (by f...) T The control determines which information should be deleted. The input gate (by i) T (Control) determines the output of cells in the main layer. T Which parts should be updated to long-term memory? T Output gate (by o) T The control mechanism determines which information from the cell state should be read, and then generates the current output of the Long Short-Term Memory (LSTM) network cell. The specific equations are as follows:
[0050] f T =sigmoid(Wf,X ·X T +W f,H ·h T-1 +b f (1)
[0051] i T =sigmoid(W i,X ·X T +W i,H ·h T-1 +b i (2)
[0052] o T =sigmoid(W a,X ·X T +W o,H ·h T-1 +b o (3)
[0053] G T =tanh(W g,X ·X T +W g,H ·h T-1 +b g (4)
[0054] c T =f T ·c T-1 +i T ·g T (5)
[0055] h T =o T ·tanh(c T (6)
[0056] In the formula W f,X W f,H W i,X W i,H W o,X W o,H W g,X and W g,H It is the weight matrix. (b) f b i b o and b g It is the bias vector. T This represents the output of a Long Short-Term Memory (LSTM) network unit at time T. tanh is the hyperbolic tangent activation function. T f T c T o T G TThese represent the input gate, forget gate, cell state, output gate, and candidate memory cell value at time T, respectively. The sigmoid function is the activation function.
[0057] The spatial-temporal layer-by-layer correlation propagation method is applied to explain long short-term memory network models:
[0058] The main idea of the space-time layer-by-layer correlation propagation method is to assign a correlation score f(x) to each individual input layer by layer by tracing the contribution of each input to the final prediction, such as... Figure 2 As shown.
[0059] The spatial-temporal layer-by-layer correlation propagation method follows a conservation principle: the total correlation allocated to a layer should be equal to the total correlation distributed in the previous layer. Assuming m and n are two consecutive layers of the neural network, the correlation scores satisfy equation (7):
[0060]
[0061] in, These are the correlation scores of individual neurons in the m-th and n-th layers, respectively. To accommodate the characteristics of different neural network structures, various rules define how the correlation scores propagate between the two layers. A basic rule, LRP-0, is shown in equation (8):
[0062]
[0063] Among them, Z i,j This represents the correlation received by neuron j in layer n from neuron i activated in layer m. ∑kZ k,j It is the total correlation from all connected neurons in layer m to neuron j before the application of the nonlinear activation function.
[0064] While the LRP-0 rule has many attractive properties, robustness and other enhancements need to be considered when applying it to real-world cases. This study uses two enhanced layer-by-layer correlation propagation (LRP) rules:
[0065] 1) Alpha-betarule (LRP-αβ):
[0066]
[0067] These refer to the positive and negative contributions from the higher layer n, respectively. α and β are two weighting parameters used to control the positive and negative contributions.
[0068] 2) Epsilon-rule (LRP-ε):
[0069]
[0070] Compared to the basic rule, the denominator contains a small positive term ε.
[0071] The method of this invention employs the LRP-ε rule, which ensures numerical stability because the denominator contains a small positive term ε. The value of ε is 0.001. In addition to the linear mapping computation in the multilayer perceptron structure, Long Short-Term Memory networks also possess a special computation called multiplicative interaction. In such computation, two neurons multiply each other. One acts as a signal, and the other as a gate, controlling the degree to which the signal influences the output.
[0072] a p =f(Z) g )·g(Z s (11)
[0073] Where f(·) and g(·) are the activation functions of the gate unit and the signal unit, respectively. g and Z s The values of the two neurons are sent from the previous layer to the gate and the signal unit, respectively.
[0074] Unlike linear mappings, the nonlinearity in multiplicative interactions presents inherent difficulties in redistributing relevance to the previous layer. In this context, activation is obtained by multiplying the value of the gate neuron by the value of the signal neuron. A widely accepted redistribution strategy is known as "signal-take-all," which refers to:
[0075] (R g R s )=(0,R p (12)
[0076] Among them, R g and R s This is the correlation score assigned to the gate neuron and the signal neuron. The signal neuron takes all correlations R from the upper layer. p The gate neurons take zero to obey conservation laws. One way to explain this strategy is that the gates control the flow of information, not the information itself. Instead, the information is completely embedded in the signal. While it seems that Z is completely ignored... g The contribution, but actually in calculating Z from the upper structure g R has been considered in the process of valuing. p The effect of the forget gate is that, under its control, new state units are updated from the previous state unit. The corresponding layer-by-layer correlation propagation rule is similar to that of multiplicative interactions. However, when the correlation score is redistributed to the input of the previous time step, the value tends to decrease exponentially with time step.
[0077] In this embodiment, building data from the open-source dataset Building Data Genome Project 2 is used for analysis. This project provides a set of open, shareable building performance-related data. Each building contains hourly electricity meter data for the entire building over a year. In addition, it provides various building characteristic metadata, including building area, type, weather, and industry. This paper selects a representative university classroom building from this project. The dataset contains nine variables: month, day of the week, hour, air temperature, dew point temperature, sea level pressure, wind direction, wind speed, and energy consumption. These nine variables are used as input variables for the Long Short-Term Memory (LSTM) network model.
[0078] The following performance metric was used for evaluation: the coefficient of variation of the root mean squared error (CV-RMSE). The CV-RMSE reflects the degree of deviation between the predicted and actual values; a smaller value indicates higher model prediction accuracy.
[0079]
[0080] Where y i and These are the actual and predicted values of building energy consumption, respectively. and , which are the average of the actual value and the average of the predicted value of building energy consumption, respectively, and n is the total number of samples.
[0081] The method described in this embodiment calculates the correlation scores of the nine variables based on the spatial-temporal hierarchical correlation propagation method when using nine variables for energy consumption prediction. Figure 5 As shown. When there are 9 input variables, the wind speed variable has the lowest correlation score (0.0097) among the correlation scores calculated using the space-time hierarchical correlation propagation method. Simultaneously, the root mean square error (RMSE) of the prediction error calculated using 9 variables has a coefficient of variation of 10.6724%. When the wind speed variable is removed, the RMSE of the prediction error decreases to 10.5090%, a decrease of 1.55% compared to the RMSE of the prediction error with 9 variables. At this point, the correlation scores of 8 variables based on the space-time hierarchical correlation propagation method are as follows: Figure 6 As shown, when there are eight input variables, the wind direction variable has the lowest correlation score (0.0169) in the correlation scores calculated using the space-time hierarchical correlation propagation method. When wind speed and wind direction variables are removed, the root mean square error of the prediction error changes by a factor of 11.9425%. Therefore, the final result only removes the wind speed variable, and subsequent time-dimensional analysis is based on the premise of removing only wind speed as a variable. Figure 7 As shown, the changes in prediction error after removing one or two variables are illustrated.
[0082] like Figure 8 The figure shows the correlation scores in the time dimension after removing one variable using the space-time hierarchical correlation propagation method. It can be seen that the closer to the 24th hour, the greater the importance. When the data from the first and second time points are removed, the coefficients of change of the root mean square error of the prediction error are 10.5228% and 12.4385%, respectively. Specifically, when the data from the first time point is removed, the coefficient of change of the root mean square error decreases by 0.13% compared to the 8 variables and 24 time points.
[0083] In the above embodiments of the present invention, the method of the present invention increases the interpretability of the model while fully preserving its expressive power. For each data instance, the algorithm in the method of the present invention can assign a relevance score to each feature, thereby explaining the contribution of each feature to the final decision; furthermore, the spatial-temporal layer-by-layer correlation propagation method applied in the present invention has stronger feature recognition capabilities and can identify the importance of the temporal and spatial dimensions of the input data based on the spatial-temporal layer-by-layer correlation propagation method. In the spatial dimension, when the least important variable is removed, the coefficient of change of the root mean square error decreases by 1.55%. In the temporal dimension, when the least important time data is removed, the coefficient of change of the root mean square error decreases by 0.13%; the spatial-temporal layer-by-layer correlation propagation method has great potential in improving the transparency of the "black box" of neural networks.
[0084] The above specific embodiments are merely explanations of the present invention and are not intended to limit the present invention. After reading this specification, those skilled in the art can make modifications to these embodiments without contributing any inventive step, but as long as they are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. A method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction, characterized by: Includes the following steps: S1. Analyze the spatial dimension, that is, the impact of different variables on the final prediction result: A. Preprocess the raw data. After preprocessing, the raw data contains all the data of M spatial variable features within N hours and forms an N×M matrix. B. Divide the preprocessed data into a training set and a test set. The training set data is used to train the long short-term memory network model, and the trained model is used in the test set to generate preliminary prediction values. C. The generated predicted values are processed by the spatial-temporal layer-by-layer correlation propagation method. The spatial-temporal layer-by-layer correlation propagation method returns a matrix of the same size as the input data for each predicted value. Then, the matrix is summed column by column and the average value is taken to obtain a 1×M vector. This vector represents the correlation between the input spatial variable features and the predicted values. D. Remove the spatial variable feature with the lowest correlation. Input the data after removing this spatial variable feature into the Long Short-Term Memory Network Model 1 to output the predicted value. Analyze the prediction result using the root mean square error (RMSE) coefficient of variation as an evaluation index, and then compare the result with the initially obtained predicted value. If the RMSE coefficient of variation of the prediction result obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is large, directly output the label of the removed spatial variable feature and the optimal RMSE coefficient of variation value; if the RMSE coefficient of variation of the prediction result obtained after processing by the spatial-temporal layer-by-layer correlation propagation method is small, further remove other spatial variables. The variable features are defined as follows: the input data contains all data of M-1 variables within N hours, and then the training set and test set are divided through steps B to C to train the Long Short-Term Memory Network Model 2 to generate predicted values. Then, the spatial-temporal layer-by-layer correlation propagation method is used to remove one other parameter variable until the root mean square error of the prediction result obtained by the spatial-temporal layer-by-layer correlation propagation method is greater than the root mean square error of the prediction result obtained by the original Long Short-Term Memory Network Model. The labels of the removed i parameter variables and the optimal root mean square error value are output, so as to optimize the prediction performance of the Long Short-Term Memory Network. S2. Analyze the time dimension, i.e., the impact of different number of hours on the final result: 1) After removing i=a parameter variables in step S1, the input data consists of all the data of (Ma) parameter variables within N hours, forming an N×(Ma) matrix; 2) Divide the data into a training set and a test set. The training set data is used to train the Long Short-Term Memory Network Model 1, and the trained model is used in the test set to generate preliminary prediction values. 3) The generated predicted values are processed by the spatial-temporal layer-by-layer correlation propagation method. The spatial-temporal layer-by-layer correlation propagation method returns a matrix of the same size as the input data for each predicted value. Then, the matrix is summed row by row and the average is taken to obtain an N×1 vector, which represents the correlation of the time dimension features with the predicted values. 4) Remove the least relevant time dimension feature. Input the data after removing this time dimension feature into the Long Short-Term Memory Network Model 2 to output predicted values. Analyze the prediction results using the root mean square error (RMSE) coefficient of variation as an evaluation index, and then compare the results with the initial predicted values. If the RMSE coefficient of variation of the prediction results processed by the spatial-temporal layer-by-layer correlation propagation method is large, directly output the label of the removed time dimension feature and the optimal RMSE coefficient of variation value. If the RMSE coefficient of variation of the prediction results processed by the spatial-temporal layer-by-layer correlation propagation method is small, further remove other time dimension features. The input data contains all data of (Ma) spatial variable features within N-1 hours. After steps 2) and 3), the data is divided into training and testing sets, and a long short-term memory network model is trained to generate predicted values. Then, the data is processed by the spatial-temporal layer-by-layer correlation propagation method to remove one other variable until the root mean square error of the predicted result obtained by the spatial-temporal layer-by-layer correlation propagation method is greater than the root mean square error of the predicted result obtained by the original long short-term memory network model. The j removed time dimension feature labels and the optimal root mean square error value are output, ultimately achieving the goal of optimizing the prediction performance of the long short-term memory network model. The raw data mentioned in step S1, after preprocessing, includes nine variables: month, week, hour, air temperature, dew point temperature, sea level pressure, wind direction, wind speed, and energy consumption.
2. The method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction as described in claim 1, characterized in that: The ratio of the training set to the test set in step B is η:1-η.
3. The method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction as described in claim 1, characterized in that: In step 2), the ratio of the training set to the test set is η:1-η.
4. The method for improving the interpretability of LSTM and the accuracy of building energy consumption prediction as described in claim 1, characterized in that: Step A involves preprocessing the raw data, including missing value imputation, normalization, and sliding window processing.