Building Energy Consumption Prediction Method Based on Multi-Source Fusion Feature Selection and Fuzzy Difference Enhancement Stacking Framework

Through multi-source fusion feature selection and fuzzy difference enhancement Stacking framework, the overfitting problems existing in the feature selection and integration framework construction of existing building energy consumption prediction models are solved, the prediction accuracy and model construction speed are improved, and higher generalization performance and prediction effects are achieved.

CN114386142BActive Publication Date: 2025-05-30SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111568679.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-05-30
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The existing building energy consumption prediction model has overfitting problems in the process of feature selection and integration framework construction, resulting in poor generalization performance, affecting the prediction accuracy and model construction speed.

Method used

A method based on multi-source fusion feature selection is adopted, combining variance selection method, recursive feature elimination, XGBoost and linear feature selection algorithm to automatically filter out the optimal feature subset. At the same time, a fuzzy differential enhancement layer is introduced to enhance the difference through error and error rate, reduce the risk of overfitting, and build a building energy consumption prediction model based on the Stacking framework.

Benefits of technology

It improves the generalization performance of feature selection and the accuracy of prediction models, reduces the model construction time, and significantly improves the accuracy of building energy consumption prediction and the generalization ability of the overall framework.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114386142B_ABST
    Figure CN114386142B_ABST
Patent Text Reader

Abstract

The present invention relates to a building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhanced Stacking framework, including: collecting historical data of building energy consumption, constructing a building energy consumption prediction data set, preprocessing the building energy consumption prediction data set, and dividing the processed data set into a training set and a prediction set; performing feature engineering on the preprocessed data set, and selecting the optimal feature subset and the optimal number of feature selections by using the multi-source fusion feature method; selecting multiple base models, optimizing the hyperparameters of the base models to form the first layer of the Stacking framework, and further constructing a fuzzy difference enhanced Stacking framework, and using the constructed fuzzy difference enhanced Stacking framework to predict the building energy consumption. Compared with the prior art, the present invention has the advantages of improving prediction performance and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building energy consumption prediction, and in particular to a building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhancement Stacking framework. Background Art

[0002] With the advancement of the current global sustainable development cause, building energy conservation has gradually been regarded as a key issue by many countries and regions. Under the demand for promoting urban sustainable development, it is very necessary to understand the characteristics of urban building energy conservation. In order to meet the current energy conservation requirements and formulate corresponding building energy conservation policies, a building energy consumption prediction model has become an essential tool. It can understand the influence of different characteristics, such as weather, occupancy ratio, date, etc., on building energy consumption, so as to guide how to improve building energy use efficiency and reduce energy consumption. Accurate energy consumption prediction can not only effectively reduce energy waste, but also reduce regional financial expenditures.

[0003] Currently, the prediction targets for building energy consumption mainly include building internal heat gain, building cooling load, regional heat load, electricity demand, and peak electricity demand. In the energy management system, the service objects of the prediction model are mainly optimization control and fault detection. Optimization control includes matching the supply and demand of building energy, maintaining indoor thermal comfort, and making the units and systems operate in the best state. Therefore, building an accurate building energy consumption prediction model by more efficient and reasonable means is an effective method to effectively control the current situation of energy consumption and improve the situation of energy waste. Continuously improving the accuracy, speed, and generalization performance of the prediction algorithm is also the key to ensuring efficient building operation.

[0004] Although the prediction method based on machine learning has been proven to have good prediction accuracy and speed, for different actual energy consumption scenarios, different data sets have their own characteristics respectively. It is a very difficult process to directly select the corresponding single prediction model according to the data set. And when a single algorithm is used for prediction, due to the large hypothesis space, the generalization performance will be poor. This prediction model with poor generalization performance will greatly affect the subsequent management of building energy consumption and energy deployment. Therefore, the idea of ensemble learning is introduced, and it has gradually become popular in energy consumption prediction in recent years due to its high generalization performance and high accuracy.

[0005] The integrated model integrates multiple single models through a combination strategy to obtain better performance than any single model. This mechanism well compensates for the one-sidedness of a single prediction algorithm, and the problem of over-expression in the hypothesis space can also be solved. According to the current combination strategies, the ensemble algorithms can be divided into three types: Boosting, Bagging, and Stacking. Compared with Boosting and Bagging, Stacking has been proven to have better prediction performance and generalization performance. Stacking uses the outputs of multiple base learners to generate a new improved dataset and then makes predictions through a meta-model. As an integrated framework, it can obtain better prediction performance than any base model and has high robustness. Currently, most of the research on the Stacking framework mainly stays at the application level, building a Stacking prediction model by selecting base models. However, when building the Stacking framework, although the cross-validation method is used to reduce overfitting, the similarity between the output results of the base learners will still lead to the overfitting problem of the prediction model. And this problem will reduce the learning generalization of the second-layer meta-learner of Stacking, thus affecting the final accuracy of the prediction model.

[0006] In addition, when predicting building energy consumption, the data collection process often involves multiple aspects, and the formed dataset usually has a large dimension. In this dataset, usually not all features play a positive role in the prediction result. The existence of useless features in the dataset not only affects the accuracy of the prediction model but also greatly reduces the model building speed. And the commonly used single feature selection algorithm often can only represent one aspect of the dataset, and this one-sidedness limits the generalization performance of the prediction model to a certain extent. Moreover, how to obtain the optimal number of features, that is, how many features to retain as the input of the prediction model, has always been a difficult point in feature selection. Summary of the Invention

[0007] The purpose of the present invention is to overcome the defects of the above-mentioned existing technologies and provide a building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference-enhanced Stacking framework.

[0008] The purpose of the present invention can be achieved by the following technical solutions:

[0009] A building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference-enhanced Stacking framework, the method comprising:

[0010] S1: Data collection and preprocessing, the specific steps include:

[0011] S101: Collect historical building energy consumption data, determine and collect weather factors and human factors that affect building energy consumption prediction, etc., and use them as the main influencing factors to construct a building energy consumption prediction data set;

[0012] In this step, as a preferred method, collect historical building energy consumption data through the intelligent energy management system;

[0013] S102: According to various features in the building energy consumption prediction data set, perform normalization processing on each feature so that different features are in the same dimension for subsequent comparison of the importance degree of different features;

[0014] S103: Divide the processed data set into a training set and a test set, use the training data to train the prediction model, and the test data is used to evaluate different prediction models.

[0015] S2: Multi-source fusion feature selection, the specific steps include:

[0016] S201: Perform feature engineering on the normalized data set to select the optimal feature subset and the optimal number of feature selections for the current data set;

[0017] S202: Respectively perform preliminary evaluation of each feature of the data set through the variance selection method (VT, VarianceThreshold), recursive feature elimination (RFE), XGBoost, and linear feature selection (LR, Linear Regression);

[0018] Among them, the variance selection method filters out the corresponding features through the variance of the feature itself: when the variance of a feature itself is small compared with the variances of other features, it means that the amount of information contained in this feature is also small compared with other features, and its influence on the final prediction result is also small, but it will greatly increase the running time of the prediction model, so it is removed. The specific variance filtering formula is as follows:

[0019]

[0020] Among them, S 2 is the variance of the feature itself, x i is the value of each sample in the feature, x mean is the average value of all samples in the feature, and n is the number of samples. In the present invention, the sample is a specific sampling point under a certain feature, that is, the sample point collected by time.

[0021] As a basic model for integrated feature selection, recursive feature elimination essentially uses a backward selection technique. Recursive feature elimination starts its search process from the entire feature network and filters according to the impact of each feature on the prediction result. Certain ranking criteria for evaluating feature importance are calculated, and both feature ranking and model performance are stored for the final feature selection. The least relevant features are gradually eliminated through each loop iteration, and the subset of input variables is updated. This process is repeated until no further variables need to be deleted.

[0022] S203: After evaluating the importance of each feature according to the mechanism of different feature selection algorithms, the feature importance scores of four different feature selection algorithms are obtained, and the feature importance under different algorithms is sorted respectively; under different requirements for the number of feature subsets, the output results for different feature selection algorithms are obtained:

[0023] R F =[X F (1),...,X F (k),...X F (m)]

[0024] In the formula, F represents the four different feature selection algorithms selected above, X F (k) is the optimal sub-feature selected by the current feature selection algorithm, and m is the total number of features to be screened out by the optimal feature subset.

[0025] S204: Compare the prediction performances under different numbers of feature selections in turn; when determining the current number of feature selections, the corresponding features are selected in turn through the sorting values of different algorithms and integrated into the optimal feature preselection set S all , and the expression is:

[0026]

[0027] In the formula, R VT , R RFE , R XG and R LR are the feature subsets screened by the variance selection method, recursive feature elimination, XGBoost, and linear feature selection respectively; the optimal preselection set integrates the results of multiple feature selection algorithms, and the number of occurrences of the optimal features inside is at most 4 and at least 1.

[0028] At this time, count the number of occurrences of each feature in the optimal prediction set, and then calculate the integrated importance value R S of the features screened by the four algorithms.

[0029]

[0030] In the formula, XS (1),...,X S (k),...X S (d) is the number of occurrences of each feature in the optimal feature preselection set.

[0031] Fusion importance value R S It serves as a foundation for screening the optimal feature subset later. The optimal feature subset is screened based on the ranking of the fusion importance values of different features. The top m features with large fusion importance values are selected as the optimal feature subset.

[0032] S205: Finally, traverse the prediction performance under all different numbers of feature selections to obtain the optimal number of feature screening, optimize the original dataset, and use it as the input of the subsequent prediction model. The prediction model is the selected base model.

[0033] S3: For the optimal feature subset obtained in S2, perform hyperparameter optimization for a single model and build a Stacking framework based on fuzzy difference enhancement.

[0034] S301: For the overall architecture of the Stacking framework, select base models to form the first layer of the Stacking framework. Evaluate the performance of different base models through the optimal feature subset after S2 feature engineering, and select XGboost, Random Forest, and LightGBM as the base models of the framework.

[0035] S302: Optimize the hyperparameters of the three base models through random search to obtain excellent single models as the base models of the first layer of the Stacking framework to build the integration framework.

[0036] S303: For the construction of the Stacking integration framework, in the two-layer structure of the Stacking framework, the first layer is formed by integrating N different basic models to form the basic model layer of the integration framework, and then a prediction model is used as the meta-model to fit the output of the first layer and serve as the second layer of the integration framework. If the input feature is X i , then the kth basic model of the first layer is F k , and the prediction model of the second layer is F. The output of the kth basic model of the first layer is F k (X i ), then the specific expression of the output is as follows:

[0037] Y i = F(F 1 (X i ), …, F k (X i ), …, F N (X i ))

[0038] The base model is trained through cross - validation. First, the original training set is divided into k parts, each part including a validation set and a test set. Each time, k - 1 parts are taken for training, and the other 1 part is used for validation, and this is repeated k times. The prediction results of the training set and the test set are denoted as S and M:

[0039]

[0040] For basic models 1 to 3, the training sets S 1 ~S 3 and the test sets M 1 -M 3 of each basic model are obtained respectively. S 1 ~S 3 and M 1 -M 3 are respectively combined to obtain a combined training set and a combined test set. The formula for the combined training set S is shown as follows, and it also applies to the combined test set M:

[0041]

[0042] S304: The error e of the current sample is obtained by the difference between the predicted value output by each base model and the true value i (n).

[0043]

[0044] where is the predicted value of the i - th base model for the current sample value, n is the number of samples, and y(n) is the true value of the label for the current sample.

[0045] S305: After obtaining the prediction value errors of each base model for the training set, it is also necessary to: judge the influence of the current error value on the prediction sample itself. Therefore, the error rate of each sample is further obtained to measure the magnitude of the above - mentioned influence.

[0046] e ci (n)=e i (n) / y(n)

[0047] In the formula, e ci (n) is the prediction error rate of each sample of each base model for the current training set.

[0048] The calculated error and error rate are used as the two input parameters of the fuzzy difference enhancement layer. Through corresponding research on the output of the first layer of Stacking, it is found that the error threshold ranges obtained for the strong learners are roughly the same. Therefore, the same fuzzy rules are set to enhance the difference in the output of the base models. The fuzzy difference enhancement layer of the present invention is set as a two-dimensional structure, with dual inputs and single output.

[0049] S306: Input the two input variables of error and error rate into the fuzzy difference enhancement layer, perform fuzzy inference through fuzzy rules, and fuzzify them into E and Ec. And finally obtain the predicted difference enhancement coefficient b i (0 < b i (< 0.6). Multiply the error of each sample by its own difference enhancement coefficient to obtain the difference enhancement value, and then integrate it with the output of the base model to obtain the new training set S' and test set M'.

[0050] S307: The second layer of the meta-model is used to train S' and predict M' to obtain the final output:

[0051]

[0052] The building energy consumption prediction method based on the multi-source fusion feature selection and fuzzy difference enhancement Stacking framework provided by the present invention has at least the following beneficial effects compared with the prior art:

[0053] 1) In the feature selection stage of the present invention, four different types of single feature selection algorithms are fused, so that the importance degree of a certain feature can be comprehensively considered during the feature selection process, thereby improving the generalization performance of the overall feature engineering; in addition, the present invention specifically adds a fuzzy difference enhancement layer on the basis of the traditional Stacking framework, and by increasing the difference in the output of the base models, the overfitting risk of the integrated framework is further reduced, thereby further improving the prediction performance of the overall framework; in the field of building energy consumption prediction, the prediction accuracy is significantly improved, the overall framework has extremely high generalization performance, and can efficiently predict the future building energy consumption situation well;

[0054] 2) The multi-source fusion feature selection in the present invention can automatically screen out the optimal number of features and the optimal feature subset for the data set, thereby greatly improving the construction speed of the integrated framework while ensuring the accuracy of the prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a multi-source fusion feature selection framework diagram of the building energy consumption prediction method based on the multi-source fusion feature selection and fuzzy difference enhancement Stacking framework in the embodiment;

[0056] Figure 2 For the setting of the double-input single-output membership function of the fuzzy layer in the embodiment, where subfigure (a) is the membership function established based on the error value, subfigure (b) is the membership function established based on the error rate, and subfigure (c) is the fuzzy difference correction coefficient of the output;

[0057] Figure 3 It is the overall framework diagram of the fuzzy difference enhancement Stacking in the embodiment. Detailed implementation manners

[0058] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0059] Embodiment

[0060] In order to increase the difference of the base models of the Stacking framework to reduce the risk of model overfitting, and thus improve the generalization ability and prediction performance of the entire framework, the present invention provides a building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhancement Stacking framework, and this method proposes a new difference enhancement fuzzy Stacking framework.

[0061] Refer to Figure 1 , Figure 2 And Figure 3As shown, in the new framework of this method, fuzzy rules are used to strengthen the difference in the output results of the first-layer base models. By calculating the error and error rate between the predicted results output by the base models and the true values, both are used as the inputs of the fuzzy difference enhancement layer for discrimination, and then the model difference enhancement coefficient is obtained through fuzzy rules. Finally, the difference enhancement coefficient and the error are integrated to obtain the enhancement value, and the output of each base model is superimposed with its respective enhancement value. In addition, when predicting building energy consumption, the data collection process often involves multiple aspects, and the formed data set often has a large dimension. In this data set, usually not all features play a positive role in the prediction results. The existence of useless features in the data set not only affects the accuracy of the prediction model, but also greatly reduces the model building speed. And the single feature selection algorithms commonly used often can only represent one aspect of the data set, and this one-sidedness limits the generalization performance of the prediction model to a certain extent. Moreover, how to obtain the optimal number of features, that is, how many features to retain as the input of the prediction model, has always been a difficult point in feature selection. For this reason, the method of the present invention proposes a multi-source fusion feature selection algorithm. By fusing four feature selection algorithms with different tendencies, the optimal number of features for the data set is automatically selected, and then a feature selection result with high generalization performance is obtained. This method can eliminate unimportant features and retain the feature subset with the largest amount of information.

[0062] Based on the above improvement ideas, during actual prediction, historical building energy consumption data, weather data, and building occupancy ratio are collected as the main factors to form the original dataset for building energy consumption prediction. According to various features in the dataset, normalization processing is performed on each feature so that different features are under the same dimension for subsequent comparison of the importance degrees of different features. The processed dataset is divided into a training set and a test set. The training data is used to train the prediction model, and the test data is used to evaluate different prediction models. Feature engineering is carried out on the preprocessed dataset to select the optimal feature subset and the optimal number of feature selections for the current dataset. For the normalized dataset, the initial evaluation of each feature of the dataset is carried out respectively through the variance threshold method (VT, VarianceThreshold), recursive feature elimination (RFE, Recursive feature elimination), XGBoost (eXtreme Gradient Boosting), and linear regression (LR, Linear Regression). After obtaining the feature importance scores of the four different feature selection algorithms, the feature importance under different algorithms is sorted respectively. The prediction performance comparison is carried out successively under different numbers of feature selections. When determining the current number of feature selections, the corresponding features are selected successively through the sorting values of different algorithms and integrated into the optimal feature preselection set. The optimal preselection set combines the results of multiple feature selection algorithms, and the number of occurrences of the optimal features inside is at most 4 and at least 1. At this time, the number of occurrences of each feature in the optimal prediction set is counted, and then the combined importance value of the features selected by the four algorithms is calculated. Finally, the prediction performance under all different numbers of feature selections is traversed to obtain the optimal number of feature selections, optimize the original dataset, and use it as the input for the subsequent prediction model.

[0063] For the overall architecture of the Stacking framework, the selection of the base model needs to be carried out to form the first layer of the Stacking framework. The performance of different models is evaluated through the optimal subset after feature engineering, and XGboost, RandomForest, and LightGBM are selected as the base models of the framework.

[0064] XGBoost consists of a series of weak learners and thus improves the gradient boosting algorithm. Gradient boosting is based on the iterative estimation of trees on the residuals obtained at each step and the adaptive update of the estimation. Gradient boosting uses gradient descent techniques and therefore selects splits that are conducive to approaching the minimum value of the objective function. The speed of XGBoost is much faster than other common machine learning methods because it can efficiently process a large amount of data in parallel. The present invention selects XGBoost as one of the base models of the Stacking framework.

[0065] The decision tree sub-model in LightGBM splits nodes using the leaf-wise splitting method, so its computational cost is relatively small. It selects the Histogram-based decision tree algorithm, divides the feature values into multiple bins, and then searches for the optimal split point on these bins to reduce storage cost and computational cost. In addition, the handling of categorical features in LightGBM also improves its performance under specific data. Compared with XGBoost, it has less memory occupancy and higher accuracy. Since LightGBM and XGBoost have different algorithmic modes, they have different tendencies towards the information in the dataset. Therefore, these two types of Boosting strong learners are used as complementary parts of the base model to improve the learning ability and final prediction effect of the entire Stacking framework.

[0066] Random Forest (RF), as a representative algorithm of the Bagging ensemble model, has an operation mode different from the Boosting algorithm. Multiple trees are integrated inside RF, and each tree is trained using an independently sampled random vector. In the training stage of RF, the Bootstrap technique is used to collect multiple different sub-training datasets from the input training dataset. And multiple different decision trees are trained in sequence, and then these decision trees are fitted to each sub-sample of the dataset. In the prediction stage, the final prediction value of the model is obtained by calculating the average of the prediction results of CART in RF. In this way, the accuracy of prediction can be effectively improved, and the risk of overfitting can be reduced. RF has advantages such as fewer parameter settings and fast convergence, and can still show strong generalization performance when dealing with a large amount of data. It can effectively avoid the problem of overfitting and is suitable for energy consumption prediction scenarios with a large amount of data. Therefore, the present invention uses RF as one of the base models of the Stacking framework.

[0067] The hyperparameters of the three base models are optimized through random search to obtain excellent single models as the base models for the first layer of the Stacking framework to build the integration framework. The three single algorithms after hyperparameter optimization are used as the base models of the Stacking framework to build the entire framework. For the base models, five-fold cross-validation is performed to reduce the overfitting risk of the entire framework. After the five-fold cross-validation of the base models, the output results are compared with the true prediction values, and the error and error rate of each sample are calculated.

[0068] For the errors and error rates obtained under different algorithms and different samples, which are used as the two inputs of the fuzzy difference enhancement layer, the fuzzy enhancement coefficient is calculated. Among them, fuzzy rules are set for the fuzzy difference enhancement layer through expert experience. The present invention maps the errors and error rates into a five-level membership function. When considering the positive and negative values of the errors separately, the absolute value membership function of the error reaches 60, the membership degree of the error rate reaches 1, and the membership function is set as a triangular membership function. Under this fuzzy rule, the model difference enhancement coefficient ranges from 0 to 0.6.

[0069] After obtaining the corresponding fuzzy difference enhancement coefficients, multiply the error of each sample by its own difference enhancement coefficient to obtain the difference enhancement value, and then integrate it with the output of the base model to obtain a new training set and test set.

[0070] The overall learning mode of the Stacking framework is prone to overfitting. Therefore, the learner in the second layer usually selects a relatively simple model to integrate the output results of the base model. The present invention selects logistic regression to perform regression prediction on the output results of the base model after difference enhancement.

[0071] In this embodiment, the above method of the present invention is verified according to actual data. In this embodiment, based on the above multi-source fusion feature selection, preprocessing of the building energy consumption dataset is performed; secondly, short-term prediction of building energy consumption is performed through a Stacking framework based on fuzzy difference enhancement. This embodiment conducts a comparative experiment through six evaluation indicators. The experiment shows that the proposed multi-source fusion feature selection can automatically select the optimal number of feature screenings for different datasets and finally obtain the optimal feature subset of the original dataset. This also creates corresponding conditions for improving the accuracy of the building energy consumption prediction model and reducing the model construction time in the follow-up. And the proposed Stacking framework based on fuzzy difference enhancement has been further enhanced in terms of the accuracy and generalization performance for building energy consumption prediction.

[0072] Specifically, it includes the following steps:

[0073] Step 1: Multi-source fusion feature selection

[0074] Fuse the differences of single feature selection algorithms through a multi-source fusion feature selection algorithm, and calculate the contribution degree of features. The algorithm uses RMSE as an evaluation indicator to compare the prediction effects of the optimal number of features screened by the algorithm. For the campus building energy consumption dataset in this embodiment, the optimal number of features obtained by the multi-source fusion feature selection algorithm is 13. Compare the prediction results with different numbers of features to obtain Table 1.

[0075] Table 1 Comparison of prediction performance under different numbers of feature screenings

[0076]

[0077] As shown in Table 1, when the number of feature selections is 13, the prediction model achieves the best prediction effect. This further verifies the effectiveness and convenience of multi-source fusion feature selection. After that, as the number of features increases, the performance of the prediction model not only fails to improve, but instead reduces the prediction accuracy of the prediction model. In addition, due to the large number of samples in the original data set, as the number of features increases, the construction speed of the prediction model will be greatly reduced. This shows that for general data sets, the prediction accuracy is usually affected by redundant and irrelevant features, and feature selection is an essential key step in the prediction model construction process.

[0078] In summary, the multi-source fusion feature selection algorithm proposed by the present invention can screen out the optimal feature subset in the data set, while reducing the calculation cost and shortening the construction time of the model. In addition, since the algorithm itself can automatically select the number of features of the optimal feature subset, this also makes up for the unreliability of manually setting the number of features, speeds up the overall running time of feature engineering, and simplifies the workload of feature engineering.

[0079] Step 2. Fuzzy difference-enhanced Stacking framework

[0080] For the optimal feature subset obtained in Step 1, single-model hyperparameter optimization is performed. The hyperparameters of three base models, namely XGboost, RF, and LightGBM, are optimized to obtain prediction strong learners for the current data set. Due to the excellent prediction performance exhibited by the three ensemble models, namely RF, XGBoost, and LightGBM, these three are used as the base learners in the first layer of the Stacking framework to build the entire ensemble framework. Since the prediction performance of the Stacking framework is affected by the prediction accuracy of each base model, hyperparameter optimization is performed on each base model before building the framework to further improve the prediction accuracy of each base model. After hyperparameter optimization, the evaluation indexes of the three algorithms are shown in Table 2.

[0081] Table 2 Comparison of prediction performance of each base model and Stacking framework after hyperparameter optimization

[0082]

[0083]

[0084] The 3 optimized prediction models are used as the base models in the first layer of the Stacking framework. To prevent the risk of overfitting, linear regression is selected as the meta-model in the second layer of the Stacking framework to fit the output of the base models in the first layer. The prediction results of the Stacking framework are also put into Table 2 to compare with the performance of each base model.

[0085] As can be seen from Table 2, the Stacking framework integrates three strongly learning models optimized with hyperparameters, thereby obtaining better prediction performance than any of these models. For building energy consumption prediction, the best-performing of the three base models is LightGBM. The overall prediction accuracy of XGBoost is slightly inferior to that of LightGBM, and the relatively poor-performing one is RF. Comparing the evaluation indicators of the Stacking prediction performance with those of LightGBM, which has the best prediction performance among the base models, its RMSE is reduced by 5.36% and the SMAPE is reduced by 5.84%. This further proves that, compared with other advanced prediction models, the Stacking integration framework has the best accuracy level.

[0086] After verifying the excellent prediction performance of the Stacking framework, in order to reduce the overfitting risk during the construction of the Stacking framework and further improve the prediction performance of the framework, the present invention proposes a new differential enhanced fuzzy Stacking framework. The new framework reduces the risk of model overfitting by increasing the difference in the outputs of the base models in the first layer of Stacking, thereby further enhancing the generalization ability and prediction performance of the entire framework. The performance comparison of the output results of the three base models of the present invention after being processed by the fuzzy difference enhancement layer is shown in Table 3. In Table 3, F-XGBoost refers to the XGBoost model processed by the fuzzy difference enhancement layer, F-LightGBM refers to the LightGBM model processed by the fuzzy difference enhancement layer, and F-RF refers to the RF model processed by the fuzzy difference enhancement layer.

[0087] Table 3 Comparison of prediction differences of each model before and after fuzzification

[0088]

[0089] The comparison results of the evaluation indicators output by each base model before and after passing through the fuzzy difference enhancement layer are shown in Table 3. It should be noted that the results of the three base models in Table 3 before the fuzzy difference enhancement are not matched with the results of the optimized base models in Table 2. This is because the results in Table 2 are the final predictions for the test set, while the models in Table 3 are the results of the base models in the first layer of Stacking obtained through cross-validation. The training sets for the models are different, so the evaluation indicators cannot be directly compared, and the output results of the base models in Table 3 are not the final prediction results.

[0090] As shown in Table 3, after the fuzzy difference enhancement processing, the effects of various indicators of XGBoost, LightGBM, and RF have all decreased to a certain extent. This means that with the change trends of their own errors and error rates, the differences among the processed base models have been enhanced to a certain extent, increasing the information entropy of the new dataset input to the second layer of Stacking, so as to enhance the learning ability of the entire prediction framework. The comparison of the evaluation indicators of Fuzzy-Stacking and traditional Stacking for the building energy consumption prediction is shown in Table 4 as follows.

[0091] Table 4 Comparison of Prediction Performance between Fuzzy-Stacking and Stacking

[0092]

[0093] After processing the outputs of the base models through the fuzzy difference enhancement layer, linear regression is used as the second layer of the Stacking framework to fit the processing results. As shown in Table 4, based on the traditional Stacking framework, the prediction performance of the Fuzzy-Stacking proposed in the present invention has been further improved. Among them, RMSE can be reduced to 12.349, and R2 reaches 0.979. The further improvement of the accuracy is because after passing through the fuzzy difference enhancement layer, the coverage range of the hypothesis space among the outputs of the base models becomes larger, thus improving the overall learning ability of the model. In addition, the fuzzy difference enhancement process and fuzzy rules are obtained from the errors and error rates of the base models. This basis causes the performance of the evaluation indicators shown by the outputs of the base models to decrease to a certain extent, but it will not reduce the prediction accuracy of the final Fuzzy-Stacking framework, and further complements the advantages among the base models.

[0094] The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhancement Stacking framework proposed by the present invention improves the multi-source fusion feature selection process. By integrating four feature selection algorithms with different tendencies, it automatically selects the optimal number of features for the dataset, and then obtains a feature selection result with high generalization performance. This method can eliminate unimportant features and retain the feature subset with the largest amount of information. On this basis, in order to increase the difference of the base models in the Stacking framework to reduce the risk of model overfitting, thereby improving the generalization ability and prediction performance of the entire framework, the present invention also proposes a new difference enhancement fuzzy Stacking framework. The new framework uses fuzzy rules to strengthen the difference in the output results of the first-layer base models; by calculating the error and error rate between the predicted results output by the base models and the true values, both are used as the inputs of the fuzzy difference enhancement layer for discrimination, and then the model difference enhancement coefficient is obtained through fuzzy rules. Finally, the difference enhancement coefficient and the error are integrated to obtain an enhancement value, and the output of each base model is superimposed with its respective enhancement value. In this way, the amount of information in the input data of the meta-model generated by the first layer of Stacking is increased, thereby reducing the risk of model overfitting and improving the overall learning rate of the meta-model. The method of the present invention provides a new prediction integration framework with high accuracy and high generalization performance for the field of building energy consumption prediction, enriching the diversity of prediction models.

[0095] As described above, the above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any staff familiar with the technical field of the present invention can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference-enhanced Stacking framework, characterized in that, it includes: Collect historical building energy consumption data, construct a building energy consumption prediction data set, preprocess the building energy consumption prediction data set, and divide the processed data set into a training set and a prediction set; Perform feature engineering on the preprocessed data set, and use the multi-source fusion feature method to select the optimal feature subset and the optimal number of feature selections; Select multiple base models, optimize the hyperparameters of the base models to form the first layer of the Stacking framework, and then construct a fuzzy difference-enhanced Stacking framework, and use the constructed fuzzy difference-enhanced Stacking framework to predict building energy consumption; The specific content of constructing the fuzzy difference-enhanced Stacking framework is: 1) First, optimize the hyperparameters of the three base models through random search to obtain excellent single models as the base models of the first layer of the Stacking framework; 2) In the two-layer structure of the Stacking framework, the first layer is formed by integrating three different basic models to form the basic model layer of the integrated framework, and then one of the models is used as the meta-model to fit the output of the first layer and serve as the second layer of the integrated framework; 3) Perform five-fold cross-validation on each base model; 4) After the base models perform five-fold cross-validation, compare the obtained output results with the true prediction values to obtain the error and error rate of each sample; 5) For the errors and error rates obtained under different algorithms and different samples, use them as the two inputs of the fuzzy difference-enhanced layer, and calculate the fuzzy enhancement coefficient; among them, set fuzzy rules for the fuzzy difference-enhanced layer through expert experience, and map the errors and error rates into a five-level membership function; 6) After obtaining the corresponding fuzzy difference-enhanced coefficient, multiply the error of each sample by its own difference-enhanced coefficient to obtain the difference-enhanced value, and integrate it with the output of the base model to obtain a new training set and test set.

2. The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference-enhanced Stacking framework according to claim 1, characterized in that, Collect historical building energy consumption data through a smart energy management system, and perform normalization preprocessing on the building energy consumption prediction data set.

3. The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference-enhanced Stacking framework according to claim 1, characterized in that, The specific content of using the multi-source fusion feature method to select the optimal feature subset and the optimal number of feature selections is: After performing feature engineering on the preprocessed data set, respectively perform a preliminary evaluation of each feature in the data set through different feature selection algorithms to obtain the feature importance score values of four different feature selection algorithms; Sort the feature importance score values under different feature selection algorithms respectively, and obtain the output results for different feature selection algorithms under different requirements for the number of feature subsets; The prediction performance under different feature selection numbers is compared in turn. When the current number of feature selections is determined, the corresponding features are selected in turn according to the ranking values ​​of different feature selection algorithms, and then merged into the optimal feature pre-selection set; Traverse the prediction performance under all different feature selection numbers, select different m features with the top importance values ​​as the optimal feature subsets of the data set, compare the prediction performance, and get the optimal number of feature screening, and then integrate and optimize the elements of the optimal feature pre-selected set to get the optimal feature subset, which is used as the input of the subsequent prediction model, and the prediction model is the selected base model.

4. The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhanced Stacking framework according to claim 3, It is characterized in that Different feature selection algorithms include variance selection method, recursive feature elimination, XGBoost, and linear feature selection methods.

5. The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhanced Stacking framework according to claim 1, It is characterized in that The selected base models include XGboost, RF and LightGBM.

6. The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhanced Stacking framework according to claim 5, It is characterized in that The fuzzy difference enhancement Stacking framework is a two-dimensional structure with dual inputs and a single output.

7. The building energy consumption prediction method based on multi-source fusion feature selection and fuzzy difference enhanced Stacking framework according to claim 1, It is characterized in that Using the constructed fuzzy difference enhanced Stacking framework, logistic regression is selected to perform regression prediction on the output results of the base model after difference enhancement.

Citation Information

Patent Citations

  • A method for predicting concrete durability based on data mining and artificial intelligence algorithm

    AU2020101854A4

  • Processing quality virtual measurement method, system, medium and equipment

    CN112947300A