Residential area energy consumption prediction method based on TabNet deep learning model
By combining the TabNet deep learning model with feature engineering and light environment factor analysis, the problems of data quality and cross-platform application in residential energy consumption prediction were solved, achieving efficient and accurate energy consumption prediction that can adapt to complex environmental conditions.
Patent Information
- Application Number
- CN202511081157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-18
AI Technical Summary
Existing methods for predicting residential energy consumption suffer from high computational costs, difficulty in data acquisition, difficulty in ensuring data quality, challenges in cross-platform application, and traditional models cannot meet the efficiency requirements of the design phase.
We employ a TabNet-based deep learning model, combined with random forest feature importance analysis and Pierce correlation coefficient analysis for composite feature engineering. Through data preprocessing, feature selection, and model training, we construct an energy consumption prediction model that considers light environment factors and building parameters. We use the Adam hyperparameter optimizer and attention mechanism for training.
It improves the accuracy and generalization ability of residential energy consumption prediction, simplifies the model structure, improves prediction efficiency and accuracy, can handle complex nonlinear relationships, reveals the characteristics of energy consumption impact, and is adaptable to energy consumption prediction in different regions.
Smart Images

Figure CN120974101A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of residential energy consumption prediction, in particular to a residential energy consumption prediction method based on a TabNet deep learning model. BACKGROUND
[0002] With the acceleration of urbanization, the volume of residential buildings in China has increased dramatically. The existing residential buildings have a large volume, which has a significant impact on energy costs, the environment, and the quality of life of residents. In the context of promoting carbon peak and carbon neutrality, accurate prediction of building energy consumption is the key to the "conservation first" principle. China has implemented building energy-saving policies and standards to promote energy efficiency and sustainable development, but building energy consumption prediction still faces challenges such as data quality and model adaptability.
[0003] The existing energy consumption prediction methods at the residential scale mainly have the following three difficulties: first, the large amount of calculation leads to an increase in time cost, second, the feature dataset is relatively difficult to obtain, the time cost is high, the data is severely missing, and the data quality is difficult to guarantee; finally, there is a cross-platform problem in the popularization and application of energy consumption prediction methods, and the learning cost of designers is high. The residential energy consumption prediction process is complex, and the residential energy consumption prediction is mainly based on white box models and black box models. The residential energy consumption prediction method based on white box models is mainly applied to engineering scenarios with comprehensive building information, but it takes a long time to predict. The residential energy consumption prediction based on black box models has a high time cost to obtain high-quality training data, which cannot meet the efficiency requirements of the residential scheme design phase. SUMMARY
[0004] The purpose of the present application is to provide a residential energy consumption prediction method based on a TabNet deep learning model to solve the problems raised in the background.
[0005] To achieve the above purpose, the present application provides the following technical solutions:
[0006] A residential energy consumption prediction method based on a TabNet deep learning model, comprising:
[0007] S1: Collect data, including residential historical energy consumption data, light environment data, residential related factor data, and building monomer physical parameters;
[0008] S2: Preprocess the data set collected in step S1, including data conversion, data cleaning, and data normalization processing;
[0009] S3: Use a compound feature engineering method that combines random forest feature importance analysis and Pearson correlation coefficient analysis to perform feature screening on the preprocessed data, and determine the key influence features of light environment and building parameters;
[0010] S4: Group the collected data samples, including a training data set and a test data set;
[0011] S5: Determine the Adam hyperparameter optimizer, train the TabNet deep learning model with fused light environment data and attention mechanism, and build the TabNet pre-training model;
[0012] S6: Input the test data into the trained TabNet model to predict the residential energy consumption, and evaluate the prediction results.
[0013] Preferably, in step S2:
[0014] S21: Numerical conversion of classification features is carried out using Label Encoder to generate new feature columns with unique integer labels and delete the original classification columns;
[0015] S22: Abnormal value identification uses 3σ rule. After difference of time series data, the data points corresponding to the difference value exceeding ±3 times the standard deviation of the mean are judged as abnormal values;
[0016] S23: Data normalization uses Regression SMOTE technology to realize the scale unification of different orders of magnitude features.
[0017] Preferably, in step S3:
[0018] S31: Preliminary sorting of feature importance is carried out by random forest algorithm, and the number of random forest trees and the depth of the tree are set;
[0019] Wherein, the random forest algorithm formula is Wherein, Y is the random forest output, η is the number of decision trees, Y i is the output of a single tree;
[0020] S32: Based on the Pearson correlation coefficient, the feature importance results selected by the random forest are further analyzed and verified, and the key features with significant influence on building energy consumption prediction are further determined;
[0021] Wherein, the Pearson correlation coefficient
[0022] Wherein, x1, y1: represent the i-th sample data of two variables, respectively,
[0023] are the sample means of variables x and y, respectively,
[0024] Used to measure the central tendency of data;
[0025] n: sample size, i.e. how many groups of (x1, y1) data pairs;
[0026] S33: Take the union of the parts retained by the random forest importance analysis and the correlation analysis;
[0027] S34: Determine the key features that affect building energy consumption.
[0028] Preferably, in step S5:
[0029] S51: In the self-supervised pre-training phase, the present application uses TabNet Pretrainer to pre-train unlabelled data, uses Adam hyperparameter optimizer, and performs hyperparameter setting of the model to optimize the TabNet pre-training model;
[0030] S52: In the fine-tuning phase, the present application further optimizes the hyperparameter setting, adopts different learning rates and batch sizes;
[0031] S53: After determining the hyperparameter optimizer Adam, the preprocessed data is input into the feature conversion network;
[0032] S54: The output of the feature conversion network is sent to the attention transformer;
[0033] S55: In each decision-making step, TabNet makes partial decisions based on masked features, and these decisions are aggregated to form the final prediction output.
[0034] Preferably, the residential historical energy consumption data includes monthly building energy consumption records and annual energy consumption records for the past five years;
[0035] The residential related environmental factor data includes temperature, humidity, wind speed, and meteorological data;
[0036] The building monomer physical parameters include building area, orientation, number of floors, and building material thermal parameters;
[0037] The light environment data includes dynamic lighting and illumination data, light climate change trend data, light scene similarity coefficient data, and outdoor landscape environment design requirement data.
[0038] Preferably, the data set features are divided into three categories:
[0039] Residential geometric features: number of floors, average area per household, shape coefficient, indoor partition ratio, total roof area, and window-wall ratio;
[0040] Residential non-geometric features: wall U value, building orientation, door and window U value;
[0041] Residential features: residential type ratio, building density, volume rate, green rate, total number of households, and geographic location.
[0042] Preferably, the data cleaning includes outlier identification and processing, missing value processing, and uniform adjustment of time series.
[0043] The missing value refers to a value missing at a certain time point in a continuous time series due to equipment failure during data recording.
[0044] The outlier refers to a data value outside the normal range due to recording failure in data recording.
[0045] The time series refers to the time of recorded data.
[0046] Preferably, the 3σ rule is based on the normal distribution characteristics of data, and the fluctuations beyond ±3 times the standard deviation of the mean are determined as outliers by calculating the mean and standard deviation of the time series difference.
[0047] Preferably, the TabNet model is implemented by pytorch_tabnet, dynamically generates feature masks through sequential attention mechanism, and the model structure includes input layer, hidden layer and output layer, wherein the hidden layer includes feature converter and attention transformer.
[0048] Preferably, the Adam optimizer update formula is:
[0049] Momentum term update: m t = β1m t-1 + (1-β1)g t
[0050] Where, m t : Momentum term at current time, records the trend of historical gradient;
[0051] m t-1 : Momentum term at last time, saves the cumulative information of previous gradient;
[0052] β1: Momentum decay coefficient, controls the influence degree of historical gradient;
[0053] g t : Original gradient at current time, reflects the update direction of current parameter;
[0054] Adaptive learning rate term update:
[0055] Where, v t : Second moment at current time, reflects the historical fluctuation amplitude of gradient;
[0056] v t-1 : Second moment at last time, saves the cumulative information of previous gradient square;
[0057] Beta2: Second-order moment decay coefficient, controls the influence degree of the square of historical gradient;
[0058] Square of the current gradient, amplifies the influence of gradient fluctuation;
[0059] Bias correction:
[0060] Wherein, Corrected first-order moment;
[0061] t: Training step, initially t is small, Close to 0, the denominator approaches 1, and the correction effect is weak; as t increases, Tends to 0, and the correction effect gradually disappears;
[0062] Bias correction:
[0063] Wherein, Corrected second-order moment;
[0064]
[0065] Wherein, theta t : Current model parameter;
[0066] Theta t-1 : Last model parameter;
[0067] Alpha: Learning rate;
[0068] Epsilon is a minimum value constant;
[0069] Take the square root of the corrected second-order moment, and add a minimum value epsilon to avoid denominator 0 leading to calculation collapse.
[0070] Compared with the prior art, the beneficial effects of the present application are:
[0071] The present application overcomes the defects of traditional methods due to lack of building information, improves the prediction accuracy and generalization ability of residential energy consumption under complex environmental conditions; The present application particularly considers the influence of light environment factors on residential energy consumption, including but not limited to the dynamic change characteristics of lighting and illumination, analyzes the differences and similarities of light climate in different climate zones, establishes a feature correlation model based on light scene similarity, to realize effective generalization of cross-regional prediction model.
[0072] The present application uses a single deep learning architecture to complete feature selection and inference tasks simultaneously, can process complex nonlinear relationships, and intuitively presents which feature data has the greatest influence on energy consumption prediction, simplifies the model structure, and improves the prediction efficiency and effect.
[0073] The application adjusts the number of decision layers, the width of the feature converter, the learning rate, the selection of the optimizer, and the sparsity regularization coefficient, so that the model can better adapt to specific data sets and prediction tasks, and the method has higher accuracy of energy consumption prediction compared with traditional prediction methods.
[0074] The TabNet model used in the application has interpretability and can screen important feature parameters. In the prediction process, the TabNet model not only considers single features, but also analyzes the influence of feature combinations on energy consumption, and reveals complex multi-factor coupling relationships. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 The flowchart of the application is shown. DETAILED DESCRIPTION
[0076] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the application.
[0077] As shown in Figure 1 A residential energy consumption prediction method based on a TabNet deep learning model, comprising:
[0078] S1: Collect data, including residential historical energy consumption data, light environment data, residential related factor data and building monomer physical parameters.
[0079] Residential historical energy consumption data includes monthly building energy consumption records and annual energy consumption records in the past five years;
[0080] Residential related environmental factor data includes temperature, humidity, wind speed and meteorological data;
[0081] Building monomer physical parameters include building area, orientation, number of floors, and building material thermal parameters;
[0082] Light environment data includes dynamic lighting and illumination data, light climate change trend data, light scene similarity coefficient data and outdoor landscape environment design requirement data.
[0083] The data set features are divided into three categories:
[0084] Residential geometric features: number of floors, average area per household, shape coefficient, indoor partition ratio, total roof area, and window-wall ratio;
[0085] Residential non-geometric features: wall U value, building orientation, door and window U value;
[0086] Neighborhood characteristics: proportion of residential type, building density, plot ratio, green ratio, total number of households, geographical location. These data come from field surveys, satellite map measurements and power supply records to ensure accuracy and reliability. These comprehensively collected data constitute the initial data set, laying a solid foundation for the energy consumption prediction model.
[0087] S2: Preprocess the data set collected in step S1, including data conversion, data cleaning and data normalization.
[0088] Data cleaning includes outlier identification and processing, missing value processing, and uniform adjustment of time series;
[0089] Missing values refer to values that are missing at certain specific time points in continuous time series due to equipment failure during data recording;
[0090] Outliers refer to data values outside the normal range due to recording errors;
[0091] Time series refers to the time of recorded data.
[0092] Outlier identification and processing refers to identifying and processing outliers or noise through statistical analysis methods to avoid model interference from inaccurate data;
[0093] Missing value processing refers to appropriate processing of missing values in the data, including filling missing values or deleting records containing missing values to ensure data integrity and accuracy;
[0094] Uniform adjustment of time series refers to constructing a continuous timeline for data gaps to ensure consistency with the data set interval.
[0095] S21: Use Label Encoder to convert categorical features to numerical values, generate new feature columns with unique integer labels and delete original categorical columns.
[0096] For data files, LabelEncoder is used to convert categorical features to numerical features, assigning each category of each categorical feature a unique integer label. Specifically,
[0097] Add the encoded features to the original data set and name them with the original feature name plus the "_encoded" suffix; delete the original categorical feature column to avoid introducing duplicate data in subsequent model training; print each encoded feature and its corresponding category number to help understand the data distribution; rename the encoded feature column by removing the "_encoded" suffix to keep the data set clean and consistent in feature naming; process all feature sets accordingly.
[0098] S22: The abnormal value recognition adopts the 3σ rule, and the data points corresponding to the differential values exceeding the mean value ± 3 times the standard deviation are determined as abnormal values after the time series data is differentiated.
[0099] The 3σ rule is based on the normal distribution characteristics of data, and the fluctuations exceeding the mean value ± 3 times the standard deviation are determined as abnormal by calculating the mean value and the standard deviation of the time series difference.
[0100] S23: The data normalization adopts the Regression SMOTE technology to realize the scale unification of different orders of magnitude features.
[0101] The data normalization processing refers to converting the data of different orders of magnitude and units to the same scale by using the Regression SMOTE data enhancement technology, reducing the bias in model training, ensuring the balanced influence of different features on model training, and avoiding the situation that some features dominate the model training because of the too large order of magnitude; the Regression SMOTE data enhancement technology refers to generating new synthetic samples to enhance the learning ability of the model for scarce samples.
[0102] S3: A compound feature engineering method combining random forest feature importance analysis and Pearson correlation coefficient analysis is adopted to perform feature screening on the preprocessed data, and key influence features of light environment and building parameters are determined;
[0103] S31: The feature importance is preliminarily sorted by the random forest algorithm, and the number of random forest trees and the depth of the trees are set;
[0104] Wherein, the random forest algorithm formula is Wherein, Y is the random forest output, η is the number of decision trees, Y i is the output of a single tree; the importance of the features is sorted by the random forest method, the contribution of each feature to the prediction ability of the model is evaluated, and the features are screened.
[0105] S32: The feature importance result screened by the random forest is further analyzed and verified based on the Pearson correlation coefficient, and the key features having a significant influence on building energy consumption prediction are further determined;
[0106] Wherein, the Pearson correlation coefficient
[0107] Wherein, x1, y1: respectively represent the i-th sample data of two variables,
[0108] are respectively the sample mean of variable x and variable y,
[0109] Measuring the concentration tendency of data;
[0110] n: the number of samples, that is, how many groups of (x1, y1) data pairs;
[0111] S33: statistical random forest importance analysis and correlation analysis, and the union of the parts reserved by both;
[0112] S34: determine the key features affecting building energy consumption.
[0113] S4: group the collected data samples, including the training data set and the test data set.
[0114] S5: determine the Adam hyperparameter optimizer, train the TabNet deep learning model fused with light environment data and attention mechanism, and construct the TabNet pretraining model.
[0115] S51: in the self-supervised pretraining stage, the application uses TabNet Pretrainer to pretrain unlabeled data, uses Adam hyperparameter optimizer, and sets the hyperparameters of the model to optimize the TabNet pretraining model.
[0116] The TabNet model is realized by pytorch_tabnet, and the feature mask is dynamically generated through the sequential attention mechanism, and the model structure includes an input layer, a hidden layer and an output layer, wherein the hidden layer includes a feature converter and an attention transformer.
[0117] The application uses TabNet model for self-supervised pretraining, and the training process uses TabNetPretrainer, and selects entmax as the mask type, so that the TabNet model trained in this way can accelerate the convergence speed and enhance the selection ability of the model to the features.
[0118] Adam optimizer refers to a commonly used gradient descent optimization algorithm, which combines the ideas of momentum (momentum) and RMSProp optimization algorithm, so that it can adapt to the learning rate of different parameters during training. Adam adjusts the learning rate by estimating the first moment (mean) and second moment (variance) of the gradient, thereby improving the optimization efficiency.
[0119] The update formula of Adam optimizer is:
[0120] Momentum term update: m t = beta1m t-1 +(1-beta1)g t
[0121] Where, m t : the momentum term at the current time, recording the trend of historical gradients;
[0122] m t-1 : momentum term of last time, save the accumulated information of previous gradient;
[0123] β1: momentum decay coefficient, control the influence degree of historical gradient;
[0124] g t : original gradient of current time, reflect the update direction of current parameter;
[0125] Adaptive learning rate term update:
[0126] Where, v t : second moment of current time, reflect the historical fluctuation amplitude of gradient;
[0127] v t-1 : second moment of last time, save the accumulated information of previous gradient square;
[0128] β2: second moment decay coefficient, control the influence degree of historical gradient square;
[0129] Square of current gradient, amplify the influence of gradient fluctuation;
[0130] Deviation correction:
[0131] Where, Corrected first moment;
[0132] t: training step, initially t is small, Close to 0, denominator close to 1, correction effect is weak; with t increasing, Tend to 0, correction effect gradually disappears;
[0133] Deviation correction:
[0134] Where, Corrected second moment;
[0135]
[0136] Where, θ t : model parameters of current time;
[0137] θ t-1 : model parameters of last time;
[0138] α: learning rate;
[0139] ∈ is the minimum value constant;
[0140] The modified second moment is square rooted, and a minimum value is added to avoid division by zero, which can cause the calculation to collapse.
[0141] The hyperparameter setting process of the TabNet model is specifically,
[0142] According to the analysis of the importance of the characteristics of the data set, the classification feature index (cat_idxs) and the dimension of the classification feature (cat_dims) of the model are defined; the embedding dimension of each category feature (cat_emb_dim) is set to 12 to balance the complexity of the model and the richness of the feature representation. The optimizer uses Adam, and the initial learning rate is set to 0.08; the mask type is sparsemax to enhance the sparsity of feature selection; the number of shared feature conversion layers (n_shared_decoder) and the number of independent feature conversion layers (n_indep_decoder) are both set to 1; the batch size (batch_size) and the virtual batch size (virtual_batch_size) are both set to 32; the maximum number of training epochs (max_epochs) is set to 1000; the tolerance number of early stopping strategy (patience) is 200. The learning rate scheduler uses StepLR, and the step size parameter (step_size) is 10. During the model training process, the enhancement mechanism is introduced, and RegressionSMOTE (p=0.2) is used for resampling the training samples to improve the prediction ability of low-frequency categories.
[0143] S52: In the fine-tuning stage, the application further optimizes the hyperparameter settings, and different learning rates and batch sizes are used.
[0144] Hyperparameter optimization is an iterative process that requires continuous adjustment based on the performance of the model in predicting target areas. In the fine-tuning stage, the application adjusts the learning rate changes during the learning process, adjusts the batch size and virtual batch size, and sets the maximum training period and patience parameter (patience) during the model training process. To balance the learning of unlabeled data by the model and prevent overfitting, the application sets the value of pretraining_ratio.
[0145] Batch size (Batch Size) refers to the number of samples used to calculate gradient updates during each training process.
[0146] S53: After determining the hyperparameter optimizer Adam, the preprocessed data is input into the feature conversion network.
[0147] The feature conversion network can learn the internal representation of the input data and convert the original features to improve prediction accuracy.
[0148] S54: The output of the feature conversion network is sent to the attention transformer.
[0149] The attention transformer dynamically adjusts the weights of features through the attention mechanism, enabling real-time analysis and updating of the importance of features in the data. In each decision step, the model determines and highlights the most contributing features based on the current data state, significantly reducing noise interference caused by redundant features and significantly improving the robustness and generalization performance of the prediction model.
[0150] S55: In each decision step, TabNet makes partial decisions based on masked features, which are aggregated to form the final prediction output.
[0151] TabNet is a deep learning model based on sequential attention mechanism, implemented by pytorch_tabnet, with interpretability. It can capture and learn complex relationships and dependencies in data through automatic feature selection and predict residential energy consumption.
[0152] Build TabNet model and use its built-in attention mechanism to dynamically assign importance weights to different features during residential energy consumption prediction.
[0153] The input layer defines the dimension of the input features, i.e. the data after feature selection and feature engineering. The hidden layer contains multiple hidden layers, each using ReLU activation function to introduce nonlinearity to capture complex interactions between features. The output layer refers to the generation of residential energy consumption prediction results.
[0154] Decision steps refer to the number of decision layers in TabNet, which affects the model's ability to capture data complexity.
[0155] S6: Input test data into the trained TabNet model to predict residential energy consumption and evaluate the prediction results. Specific embodiment 1:
[0157] Light environment data collection example:
[0158] Taking a residential area in a cold region as an example, the light environment data includes:
[0159] Dynamic lighting data: Collect hourly outdoor illuminance (300-120000 lux) through a full-sky imager, combined with indoor illuminance sensor data (50-1000 lux), to construct a 15-minute time series.
[0160] Light climate features: Extract light climate types for each season of the typical year (such as CIE full shade, full sunshine, and intermediate type), and calculate the light scene similarity coefficient with the target residential area (based on spectral distribution and illuminance fluctuation pattern matching).
[0161] Landscape light demand: The residents' preference of outdoor landscape lighting in terms of time period (18:00-24:00) and brightness (2-10 cd / m 2 ) were obtained through a questionnaire survey.
[0162] Model performance verification:
[0163] The test results in three climate zones (cold region, hot summer and cold winter region, hot summer and warm winter region) are as follows:
[0164]
[0165] Feature importance visualization:
[0166] Through the mask weight output of TabNet, the average importance ranking of light environment related features is as follows:
[0167] Indoor-outdoor illuminance difference (weight 0.22)
[0168] Light climate type (weight 0.18)
[0169] Light scene similarity coefficient (weight 0.15)
[0170] Landscape lighting usage time (weight 0.12)
[0171] Window-wall ratio and daylight factor coupling (weight 0.10)
[0172] Although the embodiments of the present application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, and the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A residential energy consumption prediction method based on the TabNet deep learning model, characterized in that, include: S1: Collect data, including historical energy consumption data of the residential area, light environment data, data on factors related to the residential area, and physical parameters of individual buildings; S2: Preprocess the dataset collected in step S1. Preprocessing includes data transformation, data cleaning, and data normalization. S3: A composite feature engineering method combining random forest feature importance analysis and Peirce correlation coefficient analysis is used to screen features of the preprocessed data and determine the key influencing features of light environment and building parameters. S4: Group the collected data samples, including training datasets and test datasets; S5: Determine the Adam hyperparameter optimizer, input training data into the TabNet deep learning model that integrates light environment data and attention mechanism for training, and build the TabNet pre-trained model; S6: Input the test data into the trained TabNet model to predict residential energy consumption and evaluate the prediction results.
2. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 1, characterized in that, In step S2: S21: Use Label Encoder to perform numerical transformation on the categorical features, generate new feature columns with unique integer labels, and delete the original categorical columns; S22: Outlier identification uses the 3σ rule. After differentiating the time series data, data points corresponding to difference values that exceed the mean ± 3 times the standard deviation are identified as outliers. S23: Data normalization uses the Regression SMOTE technique to achieve scale uniformity for features of different magnitudes.
3. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 1, characterized in that, In step S3: S31: Perform preliminary ranking of feature importance using the random forest algorithm, and set the number of random forest trees and the depth of the trees; The formula for the random forest algorithm is: Where Y is the output of the random forest, η is the number of decision trees, and Y i Output a single tree; S32: Based on the Peirce correlation coefficient, further analyze and verify the feature importance results selected by the random forest, and further identify the key features that have a significant impact on building energy consumption prediction; Among them, the Pierce correlation coefficient Where x1 and y1 represent the i-th sample data of the two variables, respectively. These are the sample means of variables x and y, respectively. Used to measure the central tendency of data; n: Number of samples, i.e., how many pairs of (x1, y1) data are there; S33: Statistical random forest importance analysis and correlation analysis, take the union of the retained portions of the two; S34: Identify key characteristics that affect building energy consumption.
4. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 1, characterized in that, In step S5: S51: In the self-supervised pre-training stage, this invention uses TabNet Pretrainer to pre-train unlabeled data, uses Adam hyperparameter optimizer, and sets the hyperparameters of the model to optimize the TabNet pre-trained model. S52: In the fine-tuning stage, the present invention further optimizes the hyperparameter settings by using different learning rates and batch sizes; S53: After determining the hyperparameter optimizer Adam, input the preprocessed data into the feature transformation network; S54: Feed the output of the feature transformation network into the attention transformer; S55: In each decision step, TabNet makes partial decisions based on masking features, and these decisions are aggregated to form the final prediction output.
5. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 1, characterized in that, The historical energy consumption data of the residential area includes monthly energy consumption records of buildings and annual energy consumption records for the past five years. The relevant environmental data for the residential area includes meteorological data on temperature, humidity, and wind speed. The physical parameters of the building include building area, orientation, number of floors, and thermal parameters of building materials; The light environment data includes dynamic changes in daylighting, light climate change trends, light scene similarity coefficient data, and outdoor landscape environment design requirements data.
6. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 1, characterized in that, The features of the dataset are divided into three categories: Geometric characteristics of residential buildings: number of floors, average area per unit, shape coefficient, interior zoning ratio, total roof area, and window-to-wall ratio; Non-geometric features of a residence: wall U-value, building orientation, and door / window U-value; Residential characteristics: proportion of residential types, building density, plot ratio, greening rate, total number of households, and geographical location.
7. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 1, characterized in that, The data cleaning includes outlier identification and processing, missing value handling, and unified adjustment of time series. The missing value refers to a value that is missing at certain specific points in a continuous time series due to equipment failure during the data recording process. The outlier refers to a data value in a data record that appears outside the normal range due to a recording failure. The time series refers to the time period of the recorded data.
8. The residential energy consumption prediction method based on the TabNet deep learning model according to claim 2, characterized in that, The 3σ rule is based on the normal distribution characteristics of the data. By calculating the mean and standard deviation of the time series difference, fluctuations exceeding the mean ± 3 times the standard deviation are judged as abnormal.
9. A residential energy consumption prediction method based on a TabNet deep learning model according to claim 1, characterized in that, The TabNet model is implemented using pytorch_tabnet and dynamically generates feature masks through a sequential attention mechanism. The model structure includes an input layer, a hidden layer, and an output layer, where the hidden layer contains a feature transformer and an attention transformer.
10. A residential energy consumption prediction method based on a TabNet deep learning model according to claim 4, characterized in that, The Adam optimizer update formula is as follows: Momentum term update: m t =β1m t-1 +(1-β1)g t Where, m t The momentum term at the current moment, recording the trend of the historical gradient; m t-1 : The momentum term from the previous moment, storing the accumulated information of the previous gradient; β1: Momentum decay coefficient, which controls the degree of influence of historical gradient; g t The original gradient at the current moment reflects the direction of parameter update. Adaptive learning rate term update: Among them, v t The second moment at the current moment reflects the historical fluctuation range of the gradient; v t-1 The second moment of the previous time step, which saves the accumulated information of the squared gradients from the previous time step; β2: Second-order moment decay coefficient, controlling the degree of influence of the square of the historical gradient; The square of the current gradient amplifies the effect of gradient fluctuations; Deviation correction: in, The corrected first moment; t: Training steps; initially, t is small. When the denominator is close to 0, the correction effect is weak; as t increases, As the value approaches zero, the corrective effect gradually disappears. Deviation correction: in, The corrected second moment; Where, θ t : Model parameters at the current moment; θ t-1 Model parameters from the previous time step; α: learning rate; ∈ is the local minimum constant; Take the square root of the corrected second moment and add the minimum value ∈ to avoid the calculation crash caused by the denominator being 0.