A method for power consumption prediction based on small sample data
Through the four-interval dynamic discrete binning and ridge regression model optimization method, combined with dynamic parameter adjustment, the overfitting and error accumulation problems in the power prediction of small sample data are solved, and high-precision multi-step prediction is achieved, which improves the adaptability and robustness of the model.
Patent Information
- Application Number
- CN202510507085.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-04-22
AI Technical Summary
In the prior art, power prediction in small sample data scenarios, there are problems of overfitting, error accumulation and poor model adaptability, and it is difficult to achieve high-precision multi-step prediction.
The four-interval dynamic discrete binning is used to process the power data, combine the ridge regression model and convex optimization algorithm to optimize the weight, introduce a dynamic parameter adjustment mechanism, and optimize the model parameters through rolling statistical features and error feedback to improve the generalization ability and robustness of the model.
High-precision and stable multi-step prediction are achieved under the conditions of small sample data, solving the problems of overfitting and error accumulation in traditional models when data is insufficient, and improving the adaptability and prediction accuracy of the model.
Smart Images

Figure CN120031264B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of load-side data prediction in power systems, and specifically relates to a method for power prediction based on small sample data, especially for scenarios with limited historical data (data volume ≤ 100). Background Art
[0002] In power system planning and scheduling, power forecasting is a core technology for ensuring safe grid operation and optimizing energy distribution. Traditional forecasting methods (such as ARIMA, LSTM, and Transformer) rely on large amounts of historical data (hundreds to tens of thousands of samples) to capture the complex characteristics of time series. However, practical applications often face challenges with small sample sizes: emerging power markets or newly constructed power generation facilities lack long-term historical data; sudden events such as extreme weather and equipment failures lead to interruptions in data continuity; and daily data cannot adequately predict the future timeframe of monthly data.
[0003] Existing small sample data prediction scenarios have the following limitations: traditional machine learning models such as neural networks are prone to overfitting problems when the amount of data is insufficient, resulting in inaccurate prediction results; recursive prediction methods such as ARIMA models have exponentially amplified errors when the prediction step size increases, resulting in the accumulation of multi-step prediction errors, making it difficult to meet the prediction accuracy requirements of more than 6 steps; static model parameters such as regularization coefficients use fixed hyperparameters and cannot dynamically adjust parameters according to the latest data, resulting in poor adaptability of the model and insufficient generalization ability.
[0004] In recent years, researchers have attempted to improve small-sample predictions through methods such as transfer learning and data augmentation, but the following issues remain: Reliance on external data. Transfer learning requires data from similar fields, which is difficult to obtain in the power sector. Regarding data generation, generative adversarial networks (GANs) generate poor quality data with limited data, require a large number of examples, and suffer from poor real-time performance. Existing methods fail to effectively incorporate the periodicity and volatility of power data.
[0005] Therefore, there is an urgent need for a small sample prediction method designed for power system characteristics that can achieve high-precision, stable multi-step predictions with limited data and have dynamic adaptability. Summary of the Invention
[0006] The present invention proposes a method for predicting electricity consumption based on small sample data. First, the historical electricity consumption data is preprocessed and the data is dynamically discretized into four intervals and binned. In combination with the periodicity and volatility of the electricity consumption data, the data feature representation method is adaptively adjusted to improve the learning ability of the prediction model. Secondly, based on the ridge regression basic model, a A ridge regression prediction sub-model with differentiated hyperparameter configurations is used to optimize the The weight coefficients of the sub-models are optimized and solved, and the loss function of the multi-ridge regression model is reset. The weight coefficients after optimization are put into the model as the preliminary prediction model, and the The sub-models are re-set to minimize the prediction mean square error. Finally, a dynamic parameter adjustment mechanism is added to the model. Based on the mean absolute percentage error ( ) and the set threshold to dynamically adjust the model's hyperparameters, improve the model's generalization and robustness, and ensure that the prediction error meets the accuracy requirements.
[0007] A method for power consumption prediction based on small sample data includes:
[0008] Collect historical electricity data with a minimum time unit of month to construct an initial data set, where the total sample size is . The original data is preprocessed, including missing value interpolation, outlier correction and normalization operations, to eliminate the interference of dimensional differences on model training. Multi-dimensional time series analysis is carried out on the preprocessed electricity data, including: overall trend analysis, periodicity detection and peak and valley feature extraction. Overall trend analysis, through time series decomposition (STL decomposition), extracts long-term trend items, draws trend change graphs, and effectively identifies the growth or decay pattern of electricity data; periodicity detection, based on Fourier transform (FFT) calculation of spectrum energy, combined with autocorrelation function (ACF) analysis, determines whether the data has significant periodicity, the overall period length of the data and the length of local characteristic period.
[0009] Based on the above analysis, the present invention proposes a four-interval dynamic discretization binning method. It breaks through the limitations of traditional equal-width and equal-frequency division and adaptively determines the initial interval boundaries based on the data distribution characteristics. Unlike the existing method of mechanically dividing intervals, the present invention combines the statistical characteristics of the data and adds 25% quantiles through cumulative distribution calculation to dynamically generate four intervals of low power, medium-low power, medium-high power, and high power, thereby more accurately reflecting the essential distribution of the data. The rules are as follows: Define the rule function for dynamically demarcating the initial interval boundaries:
[0010]
[0011]
[0012] Where: Indicates historical power data Quantile; Indicates the interval boundary;
[0013] Interval bounding function:
[0014]
[0015] Where: Indicates low battery interval; Indicates the medium-low power range and the medium-high power range; Indicates high battery range; is the minimum value in the overall data; is the maximum value in the entire data.
[0016] The dynamic definition rules of interval boundaries of the present invention are designed for the periodicity and volatility unique to power data, and aim to improve the feature characterization capabilities in small sample scenarios through intelligent binning strategies. This method uses quantile binning as the basic framework to adapt to the time-varying characteristics of electricity. For data with significant differences in peak and valley periods or drastic seasonal changes, which can easily lead to the loss of feature information, the present invention introduces a dynamic adjustment mechanism: for load curve changes caused by summer cooling and winter heating, a seasonal adaptation strategy is adopted to dynamically adjust the binning rules according to the peak and valley periods and seasonal characteristics of the data, and the new boundaries are gradually transitioned according to the weighted average to achieve dynamic adjustment of the interval. The dynamic adjustment formula is specifically as follows:
[0017]
[0018] Where: is the historical electricity quantile of the new dynamic range; The historical electricity quantile initially set; The current historical electricity data quantile; is the smoothing coefficient.
[0019] The original data is mapped to the discretization interval according to the above rules. After the four-interval dynamic discretization binning, the discretization label with the timestamp is generated. The categorical features of the data are used as input features for model training to enhance the feature representation capability of the power fluctuation pattern.
[0020] The power prediction method based on small sample data is constructed Each sub-model is a ridge regression model with different regularization parameters. It captures different characteristic patterns of the data through model diversity, and combines the constrained convex optimization algorithm to calculate the optimal weight and adaptive mechanism to improve the stability and accuracy of the prediction.
[0021] The power prediction method based on small sample data is aimed at Different regularization parameters are used to set the loss function of the multi-ridge regression model. The specific formula is:
[0022]
[0023] Where: is the set loss function; is the sample size; is the number of features; It is The first data Features represents the intercept term; It is The regression coefficient of each feature; is the regularization parameter of different models; The first The true value of the data.
[0024] By adjusting the regularization parameter , to balance model complexity and generalization ability. Different regularization parameters The model can capture the fluctuation characteristics of different scales and directions in the data and show complementarity in prediction: low regularization parameter Models, such as , the model has strong fitting ability and can capture short-term fluctuations in data, but it is easy to produce overfitting problems in the model; high regularization parameters Models, such as It can improve the generalization ability of the model and smooth out noise interference, but it ignores detailed features, resulting in poor prediction accuracy. In order to cover the diversity of data features and ensure that regularization strengths of different orders of magnitude are covered, The regularization parameter of the model The values are evenly distributed symmetrically within a specific interval, and the logarithmic interval coefficient is set. The specific rules are as follows:
[0025]
[0026]
[0027] Where: and According to the number of models Certain, such as ,but 、 ; is the total number of models. To avoid computational redundancy, the value is limited to 5-8; for The first model in the is the logarithmic interval coefficient.
[0028] In the aforementioned method for predicting power consumption based on small sample data, the model weight allocation is a weight allocation mechanism based on constraint optimization, which is dynamically allocated through data modeling and numerical optimization. Specific goals include: minimizing the prediction error; reducing the mean square error after multi-model fusion through optimal weight combination; and establishing a new weight normalization constraint, that is, the sum of the weights of all models is 1. , avoid excessive bias towards a single model; set weight boundary constraints , prevent extreme weight distribution from causing prediction fluctuations and improve model stability; combine gradient optimization and numerical solution methods to improve the convergence speed of the optimization process and ensure good computational efficiency under small sample data conditions;
[0029] The objective function of the constrained optimization algorithm is to minimize the prediction mean square error using numerical optimization tools. The constrained optimization objective function is:
[0030]
[0031] The constraints are:
[0032]
[0033] Where: is the weight vector of the model; For the The weight of each model; For the Model No. The predicted value of the step; For the The true value of the step; is the total number of models; is the prediction step length;
[0034] The sequential least squares programming algorithm is used to solve the optimal weight. The initial weight is defined as:
[0035]
[0036] Where: is the initial weight; is the total number of models;
[0037] After iteratively solving the optimal solution under the current conditions, calculate the objective function gradient: . Set a fixed learning rate , weight adjustment . Update the weight vector according to the objective function gradient calculation result , so that the weights gradually approach the optimal solution that satisfies the constraints. Indicates passing The weight after iterations; Indicates the optimal solution under current conditions;
[0038] according to The basis model is reset to minimize the prediction mean square error, and its function is:
[0039]
[0040] Where: To minimize the prediction mean square error; For the The weight of each model; is the prediction step length; is the total number of models; For the The model for The predicted value of the step; For the The true value of the step.
[0041] The present invention proposes an adaptive hyperparameter adjustment mechanism based on prediction error, which dynamically adjusts the regularization parameter by real-time monitoring of the prediction error. , balancing the model's fitting ability and generalization performance. The mean absolute percentage error is used as the adjustment trigger indicator, and the mean absolute percentage error calculation formula is:
[0042]
[0043] Where: is the mean absolute percentage error; is the prediction step length; is the actual value; is the predicted value.
[0044] Set the error threshold to ,when , triggers parameter adjustment. The parameter adjustment rule is: when the error exceeds the threshold, the regularization parameter is proportionally attenuated, and the attenuation ratio range is 0.8 to 0.95; the regularization attenuation rule is:
[0045] ,
[0046] Where: is the attenuation ratio if and only if , trigger the effect; is the new regularization parameter after solution; is the original initial regularization parameter;
[0047] Dynamic adjustment based on the error margin , the specific adjustment formula is:
[0048]
[0049] Add a border protection mechanism, if If the preset range is exceeded, the boundaries of the interval are reset.
[0050] The electricity forecasting method based on small sample data further generates rolling statistical features in the training set, including the mean and standard deviation of the data within the window period, to reflect the short-term fluctuation pattern of the time series; the window length matches the seasonal cycle of the electricity data to strengthen the embedded relationship between the time series and the electricity data; the standard deviation is used to quantify the data fluctuation amplitude and distinguish normal fluctuations from abnormal noise. The rolling mean and standard deviation calculation formula is:
[0051]
[0052]
[0053] Where: is the window length; For training set In the window Monthly rolling mean; For training set In the window Monthly rolling standard deviation; The first The true value of the data.
[0054] Add dynamic adjustment mechanism, if the training is concentrated Standard deviation within the window If the sudden increase or decrease exceeds 3 times of the previous data and the next data, the window length is adjusted, and the main period of the data is identified through Fourier transform or autocorrelation analysis to automatically calibrate the window length. , The value range is The data standard deviation is a subsidiary condition of the adaptive mechanism and is fed back to the regularization parameter dynamic adjustment mechanism to participate in the dynamic adjustment of the regularization parameter.
[0055] The power prediction method based on small sample data, the preset threshold is , and the prediction error of the next M data points is evaluated by the mean absolute percentage. Both are greater than the predetermined threshold , the regularization adjustment mechanism, weight adjustment mechanism and dynamic window adjustment mechanism are triggered simultaneously, and the three mechanisms work together to adjust the model parameters until the conditions are met.
[0056] Compared with the existing technology, the present invention has the following advantages: Traditional prediction models, such as LSTM and ARIMA models, rely on a large amount of historical data to ensure prediction accuracy. The present invention effectively alleviates the problem of small samples ( ) scenarios, it can still maintain high-precision prediction capabilities when samples are severely insufficient, and solve the high dependence of existing technologies on data scale.
[0057] Existing recursive prediction methods are prone to step-by-step error amplification in multi-step predictions. The present invention significantly suppresses the error accumulation effect through the collaborative design of rolling statistical feature extraction and four-interval dynamic discretization binning, combined with a dynamic weight constraint mechanism, to ensure the consistency and reliability of future multi-step predictions.
[0058] Traditional models often use fixed hyperparameters, making them difficult to adapt to the non-stationary nature of power data. This paper introduces an adaptive parameter adjustment mechanism based on error feedback. By monitoring errors in real time and dynamically attenuating regularization parameters, the model can quickly respond to complex scenarios such as sudden load changes and seasonal fluctuations, achieving greater generalization than static models.
[0059] Through the closed-loop linkage of four-interval dynamic discretization binning, multi-model fusion, weight optimization, adaptive adjustment and other links, a multi-level collaborative optimization system is formed, breaking through the limitations of single technical improvements and achieving systematic improvements in prediction accuracy, stability, real-time performance and other dimensions. It has stronger comprehensive advantages than the isolated solutions of existing technologies.
[0060] These innovative designs enable the present invention to demonstrate greater robustness and industrial application value in small-sample power forecasting scenarios, providing new technical support for key applications such as power grid scheduling and new energy management. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The details and advantages of the present invention are further elaborated through specific implementation cases. The accompanying drawings are used to intuitively present the key technical points of the present invention and to assist in illustrating its advantages. For those skilled in the art, without creative effort, other relevant diagrams can be derived based on these drawings to further understand the present invention.
[0062] Attachment Figure 1 , basic flow chart;
[0063] Attachment Figure 2 , four-interval dynamic discretization binning flow chart;
[0064] Attachment Figure 3 , regularization parameter dynamic tuning flow chart;
[0065] Attachment Figure 4 ,Extract the graph of the change trend of the original data through STL;
[0066] Attachment Figure 5 , Fourier transform spectrum energy map of original data;
[0067] Attachment Figure 6, the autocorrelation function diagram of the original data;
[0068] Attachment Figure 7 , distribution diagram of peak and valley values within the cycle;
[0069] Attachment Figure 8 , single original ridge regression true value predicted value map;
[0070] Attachment Figure 9 , ARIMA model true value predicted value graph;
[0071] Attachment Figure 10 , the true value predicted value diagram of the model of the present invention. DETAILED DESCRIPTION
[0072] The invention is further described in detail through the accompanying drawings. The implementation cases are only used to more fully illustrate the specific technical content of the present invention. The content of the present invention is not limited to the implementation cases shared, and can be applied to other fields.
[0073] like Figures 1 to 10 As shown, a method for power prediction based on small sample data includes the following steps:
[0074] The electricity consumption data with the minimum unit of month is collected. The data volume is less than 100. The data is the monthly electricity consumption data of the whole society in a province (unit: 10,000 kWh), and the time range is from 2017 to 2024, with a total of 96 data. No additional features such as temperature, wind speed, air pressure, etc. are added. Only the single variable of electricity consumption is used to analyze and predict the data. First, the data is preprocessed, the data is detected for outliers and missing values, and the data is normalized. The judgment of abnormal data is whether the fluctuation amount of the original data and the data on both sides exceeds , serves as the basis for judgment. If there are fewer than three outliers, no outlier processing is performed. If there are more than three outliers, the outliers are replaced by the mean of the left and right sides. Missing data is handled in the same way: if there are fewer than three missing values, no outliers are processed. If there are more than three missing values, the mean of the left and right sides is used to fill the missing values.
[0075] After data preprocessing, the present invention uses a multi-stage analysis method to implement periodic feature mining and dynamic binning of electricity data: first, time series decomposition is used to decompose the data structure into trend terms, seasonal terms, and residual terms, and characteristic analysis is performed on the long-term and overall trends of the data. On this basis, the trended data is analyzed in the frequency domain using fast Fourier transform, focusing on identifying local periodic fluctuations outside the annual cycle. Power spectral density detection reveals that the data has significant four-month local periodic fluctuations. To verify the reliability of this period length, autocorrelation function analysis is further introduced, and the autocorrelation coefficients of different lag orders are calculated. It is confirmed that there is a significant peak at the lag of four months, and the valley sequence is distributed at regular intervals, thus confirming the significance of the local period length.
[0076] Based on the results of the above analysis, the data is dynamically discretized into four intervals and binned. The initial interval boundaries are calculated using quantiles (25%, 50%, 75%):
[0077]
[0078] According to these quantiles, four intervals are initially divided. For low power range, For low to medium power range, For medium to high power range, High power range.
[0079] The maximum and minimum values in the local cycle are used to determine whether the interval is reasonable, focusing on the data in summer and winter, which have strong seasonality. Determine whether the high power interval and low power interval can fully cover the power data of the two quarters. If the seasonal data exceeds the current interval boundary, the boundary of the interval is adjusted by weight according to the formula: . The initial value is 0.7, and the boundaries of the final four intervals are determined by dynamically adjusting the interval boundaries.
[0080] Map the data to the discretization interval according to the above rules, and generate the discretization label with the timestamp after the four-interval dynamic discretization binning. The categorical characteristics of . Specifically expressed as:
[0081]
[0082] All data is labeled and classified by dynamic interval changes. This method is designed for small sample data conditions, determining the labels within each interval based on the maximum and minimum values of each interval. Limited power data is mapped to a limited interval, filtering out short-term random fluctuations, reducing or minimizing the interference of single abnormal data on model feature learning, and reducing the risk of model overfitting.
[0083] After completing the four-interval dynamic discretization binning process, the present invention further generates rolling statistical features to enhance the extraction capability of periodic features. The specific implementation is as follows: Based on the inherent periodicity of power data, the sliding window size is set to , by calculating the training set In the window Average power data within the month window and standard deviation , quantifies the intensity of local load fluctuations. Reflects the average load level within the cycle, standard deviation Characterize the discrete degree of load, and the two work together to capture the stability and abnormality characteristics in periodic fluctuations. Add a dynamic adjustment mechanism, if the data standard deviation If the sudden increase or decrease exceeds 3 times of the previous data and the next data, the window length is adjusted, and the main period of the data is identified through Fourier transform or autocorrelation analysis to automatically calibrate the window length. , The value range is 2-24. It should be noted that the parameters involved in the above formula Indicates the first Step index of step prediction and training set index Strictly differentiate between application scenarios. This design significantly improves the model's ability to learn periodic evolution patterns through dynamic calculation of windowed statistics.
[0084] Based on the ridge regression model, a multi-ridge regression model is constructed, in which , that is, constructing 5 ridge regression models. In order to cover the diversity of data characteristics and ensure that regularization strengths of different orders of magnitude are covered, The regularization parameter of the model The values are symmetrically and evenly distributed in a specific interval, according to the logarithmic spacing coefficient , Calculate the baseline value of the regularization parameter for each model .
[0085] Through the constrained optimization algorithm The weights of each ridge regression model are assigned, and the initial weights are obtained according to the initial weight formula , using the least squares programming algorithm, the weights are iteratively solved while satisfying the constraints: the mean squared error of the fused prediction results on the test set is minimized, and the weight sum is 1 and the weight boundary constraints: each weight is between 0 and 1. The algorithm sets boundary condition checks to ensure that the results after each iteration are within the boundary conditions. After iteratively solving the optimal solution under the current conditions, the objective function gradient is calculated: . Set a fixed learning rate , weight adjustment . Update the weight vector according to the objective function gradient calculation result , so that the weights gradually approach the optimal solution that satisfies the constraints. The weights after optimization are .
[0086] Based on the previous analysis, the data is divided into training set and test set, and the original data , 90 data points in the dataset are used as training sets, and the remaining 6 data points are used as test sets. Discrete labels, rolling mean, and rolling mean square error are input into the model as auxiliary features. And set the number of lags. In this example, the number of lags set is Based on the latest weights for the future months of data and set the threshold to The MAPE error is calculated for the prediction results. If the error result MAPE is greater than the set threshold, the regularization parameter attenuation mechanism is triggered. The regularization parameter attenuation formula is: , . Dynamically adjust according to the error limit , the specific adjustment formula is: . Also add a boundary protection mechanism in the program. If If the MAPE of the predicted data still exceeds the threshold under the optimal regularization parameter, the error information is fed back to the weight optimization module through the feedback mechanism to re-solve the optimal weight.
[0087] In the example verification process, ARIMA model and original ridge regression model are added for comparison. Only electricity data is used. The training set data is 90 and the test set data is 6. When predicting the ARIMA model, no additional temperature, weather and other features are added. When training the original ridge regression model, only the original data is used, and the data after the four-interval dynamic discretization bins and data labels are not added. Only the original power data after normalization is used as the input feature to train the data. The training set of the data is 90 data and the test set data is 6. When comparing the original ridge regression model with the model of the present invention, the parameters are all used. 、 、 ,in It represents the lag number; It represents the length of the rolling window. is the number of partitions. All other parameters of the original ridge regression model are unadjusted data. The data prediction results are shown in the following table:
[0088] Table 1 MSE and MAPE data of each model prediction
[0089] Model MSE MAPE Single ridge regression model 4.30 6.78% ARIMA model 6.36 9.51% Model of the present invention 1.42 2.18%
[0090] From Table 1, it can be intuitively seen that the model of the present invention is optimal in both MSE and MAPE, and the MAPE of the model of the present invention is improved by 67.85% compared with the single ridge regression model under the condition of small sample data.
Claims
1. A method for predicting power consumption based on small sample data, characterized in that: The steps include: First, historical electricity data is preprocessed and dynamically discretized into four bins. Taking into account the periodicity and volatility of electricity data, the data feature representation method is adaptively adjusted to improve the learning ability of the prediction model. The original data is mapped to discretized bins according to the above rules. After dynamic discretization into four bins, categorical features with discrete labels and timestamps are generated as input features for model training. Secondly, based on the ridge regression basic model, K ridge regression prediction sub-models with differentiated hyperparameter configurations are constructed. The weight coefficients of the K sub-models are optimized and solved using a convex optimization algorithm with constraints. The loss function of the multi-ridge regression model is reset, and the optimized weight coefficients are put into the model as the preliminary prediction model. The prediction mean square error is reset for the K sub-models. Finally, a dynamic parameter adjustment mechanism is added to the model: Based on the feedback relationship between the mean absolute percentage error (MAPE) and a set threshold, the model's hyperparameters are dynamically adjusted to improve the model's generalization and robustness, ensuring that the prediction error meets the required accuracy. Using a ridge regression model under optimal weight conditions, the predicted values for the next M (M ≥ 3) months are output to obtain the electricity consumption forecast result. The hyperparameters of the dynamic adjustment model mainly include: Set the error threshold to θ. When MAPE>θ, the parameter adjustment is triggered. The parameter adjustment rule is: when the error exceeds the threshold, the regularization parameter is proportionally attenuated, and the attenuation ratio range is 0.8 to 0.
95. The regularization attenuation rule is: α new =γ·α old ,γ∈[0.8,0.95]; where: γ is the attenuation ratio, and the effect is triggered when and only when MAPE>θ; α new is the new regularization parameter after solution; α old is the original initial regularization parameter; γ is dynamically adjusted according to the error exceeding the limit. The specific adjustment formula is: Add a boundary protection mechanism, if α new If the preset range is exceeded, the boundaries of the interval are reset; The dynamic window adjustment mechanism includes: Rolling statistical features are further generated in the training set, including the mean and standard deviation of the data within the window period. The window length is dynamically adjusted based on whether there is a sudden change in the rolling mean and standard deviation. The window length matches the seasonal cycle of the power data and strengthens the embedding relationship between the time series and the power data. The formula for calculating the rolling mean and standard deviation is: Where: W is the window length; μ t is the rolling mean of the t-th month in the W window of the training set; σ t is the rolling standard deviation of the t-th month in the W window in the training set; i is the true value of the i-th data in the training set; The parameter adjustment mechanism includes: The preset threshold is θ, and the prediction error of the next M data points is evaluated by the mean absolute percentage; when the model prediction result exceeds the MAPE greater than the preset threshold θ for more than 3 times, the regularization adjustment mechanism, weight adjustment mechanism and dynamic window adjustment mechanism are triggered at the same time, and the three mechanisms work together to adjust the model parameters until the conditions are met.
2. The method for predicting power consumption based on small sample data according to claim 1, characterized in that: The four-interval dynamic discretization binning process adaptively determines the initial interval boundaries based on the data distribution characteristics. Combined with the statistical characteristics of the data, 25% quantiles are added through cumulative distribution calculation to dynamically generate four intervals: low power, medium-low power, medium-high power, and high power. The rule function for dynamic programming of the initial boundaries is: Where: Q(P) represents the p quantile of historical electricity data; Bin i Indicates the interval boundary; Based on the initial interval boundaries, a dynamic adjustment mechanism is introduced: in response to the load curve changes caused by summer cooling and winter heating, a seasonal adaptation strategy is adopted to dynamically adjust the binning rules according to the peak and valley periods and seasonal characteristics of the data. The new boundaries are gradually transitioned according to the weighted average to achieve dynamic adjustment of the interval; the dynamic adjustment formula is as follows: Where: is the historical electricity quantile of the new dynamic range; is the historical electricity quantile initially set; Q′ i is the quantile of the current historical electricity data; λ is the smoothing coefficient.
3. The method for predicting power consumption based on small sample data according to claim 1, characterized in that: The K base models are ridge regression models with different regularization parameters. The loss function of the multi-ridge regression model is reset. The specific formula is: Where: L(β) is the set loss function; N is the number of samples; P is the number of features; x ij is the jth feature of the i-th data; β0 represents the intercept term; β j is the regression coefficient of the jth feature; α k is the regularization parameter of different models; y i is the true value of the i-th data in the training set.
4. The method for predicting power consumption based on small sample data according to claim 1, characterized in that: The convex optimization algorithm with constraints is used to optimize the weight coefficients of the K sub-models. Through data modeling and numerical optimization, a dynamic weight allocation mechanism based on constrained optimization is realized. The constrained optimization objective function is: The constraints are: Where: w=[w1,w2,……,w k ] is the weight vector of the model; w k is the weight of the k-th model; is the predicted value of the kth model at the mth step; y m is the true value of the mth step; K is the total number of models; M is the prediction step length; The initial weights are set to: Where: w (0) is the initial weight; After iteratively solving the optimal solution under the current conditions, calculate the objective function gradient: Set the fixed learning rate η = 0.01, and the weight adjustment According to the objective function gradient calculation results, update the weight vector w (n+1) =w (n) +△w, so that the weight gradually approaches the optimal solution that satisfies the constraints; w (n) represents the weight after n iterations; w (n +1) Indicates the optimal solution under the current conditions.
5. The method for predicting power consumption based on small sample data according to claim 1, characterized in that: Reset the minimum prediction mean square error based on the K basis models, and its function is: Where: MSE is the minimum prediction mean square error; w k is the weight of the k-th model; M is the prediction step size; K is the total number of models; is the predicted value of the kth model for the mth step; y m is the true value at step m.
Citation Information
Patent Citations
Short-term load prediction method and system based on LSTM-DNN hybrid neural network
CN118970924A
Load short-term probability prediction method based on multi-valued quantile regression and ensemble learning
CN119009931A