Short-term load prediction method based on random forest algorithm and rough set theory
By using the random forest algorithm to filter important features and rough set theory corrections, the problem of insufficient accuracy in existing power load forecasting is solved, and effective correction and high-accuracy prediction of local abrupt changes are achieved.
Patent Information
- Application Number
- CN202511245259.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-12-16
AI Technical Summary
In existing power load forecasting technologies, the process of determining model input features has limitations, resulting in insufficient forecast accuracy, difficulty in effectively correcting local abrupt changes and drastic fluctuations, and a lack of objective basis for feature selection.
The random forest algorithm is used to rank the importance of load prediction features. Iterative optimization is performed by combining the preliminary prediction results of the deep learning model and rough set theory. The feature importance evaluation strategy is dynamically adjusted, and local and abrupt points in the prediction curve are corrected by adaptive correction parameters.
It improves prediction accuracy, especially at local fluctuations and abrupt changes in the load curve, significantly reducing prediction errors and ensuring the stability and high accuracy of the model under different data and environments.
Smart Images

Figure CN121150002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power load forecasting technology, specifically a short-term load forecasting method based on the random forest algorithm and rough set theory. Background Technology
[0002] Short-term load forecasting of power systems is a fundamental technical task for ensuring the safe, stable, and economical operation of the power grid. The accuracy of the forecasts directly affects the formulation of generation plans, the arrangement of grid operation modes, and electricity market trading decisions. Overestimating future loads can lead to redundant allocation of generation resources, increasing unnecessary reserve costs and energy losses; while underestimating loads may cause power shortages, threatening the safety and stability of the power grid.
[0003] To address the inherent complexity of load data, artificial intelligence methods have gradually become the mainstream technology in short-term load forecasting. In practical applications, deep learning models are typically used to learn and fit complex load variation patterns. To improve model performance, algorithms such as random forests are first used to preprocess the original feature dataset. By calculating the importance of each feature, a subset of features is selected, and this subset is then used as input to the deep learning model to generate the final prediction result.
[0004] However, existing power load forecasting technologies have limitations in determining the model input features. Some methods rely on experience for feature selection, lacking objective quantitative evaluation. This leads to the introduction of weakly correlated or redundant features into the model, thus interfering with forecast accuracy. Existing combined forecasting methods lack the ability to correct forecast results, and their optimization objectives are mostly focused on reducing the overall average error. When the load curve experiences local abrupt changes or drastic fluctuations, the model struggles to effectively track these changes, resulting in significant forecast biases at these critical points. Therefore, this invention provides a short-term load forecasting method based on the random forest algorithm and rough set theory to address the shortcomings of existing technologies. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a short-term load forecasting method based on the random forest algorithm and rough set theory, which solves the problems of insufficient prediction accuracy, lack of correction for local prediction points and abrupt change points, and lack of basis for feature selection in existing technologies.
[0006] To achieve the above objectives, this invention provides the following technical solution: a short-term load forecasting method based on the random forest algorithm and rough set theory, comprising the following steps:
[0007] S1 collects historical load data through sensors, smart meters, or historical databases, and constructs characteristic quantities for load forecasting. These characteristic quantities include, but are not limited to: month and day information, maximum temperature, minimum temperature, average temperature, average relative humidity, air quality, average wind speed, sunrise time, and sunset time corresponding to the historical load data.
[0008] S2, the load prediction features are ranked by importance using a random forest algorithm to generate a subset of features with high influence on the prediction results. Specifically, this process involves: using the Gini index to measure the purity of each decision tree node in the random forest based on the attributes of the features; and calculating the importance score of each feature in the random forest based on the change in the Gini index before and after node branching. Then, the load prediction features are sorted in descending order according to the importance score, and the features with high importance are selected as the feature subset. The formula for calculating the Gini index is:
[0009]
[0010] In the formula, C represents the number of categories. This represents the probability estimate that sample m belongs to class c.
[0011] S3, a deep learning model is used to make preliminary predictions on the generated feature subset and the historical load data. During this process, the mean squared error loss function is used to calculate the difference between the preliminary predictions output by the deep learning model and the actual values of the historical load data. Based on the loss, the feature importance evaluation strategy of the random forest algorithm is dynamically adjusted, and a better feature subset is regenerated. Specifically, this dynamic adjustment involves comparing the preliminary predictions of the deep learning model with the actual values of the historical load data and calculating the difference. Based on the magnitude and trend of the difference, the weights or parameters of each decision tree in the random forest algorithm are adaptively adjusted to change the importance score of the load prediction features. A better feature subset is then regenerated based on the adjusted random forest algorithm as input for the next round of iterative optimization.
[0012] S4, based on rough set theory, the initial predicted values of the deep learning model and the reconstructed feature subset are used as input to adaptively construct correction parameters to correct the initial predicted values. Specifically, this correction process involves: using the initial predicted values output by the deep learning model as the data set to be corrected; and adaptively constructing correction parameters a, b, c and a scaling factor s based on the changing trends between consecutive predicted values in the data set to be corrected. t The local and abrupt change points in the dataset to be corrected are corrected using the aforementioned correction parameters and the scaling factor. The correction parameters a, b, c and the scaling factor s are... t The calculation formula is:
[0013]
[0014] b = sgn(y t+2 -2y t+1 +y t );
[0015]
[0016] In the formula, y t and y′ t The predicted and corrected values at time t are respectively, y t+1 and y t+2 These are the predicted values at times t+1 and t+2, respectively.
[0017] S5, the corrected predicted value is used as the auxiliary target for the next round of training of the deep learning model for iterative optimization until the prediction error reaches a preset threshold. During this iterative optimization process, at least one of the following metrics—Mean Absolute Percentage Error (MAPE), Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE)—is used to evaluate the difference between the auxiliary target and the true historical load data. When the prediction error is less than the preset threshold, the iteration stops, and the final load prediction value is output. The formula for calculating the Mean Absolute Percentage Error (MAPE) is:
[0018]
[0019] In the formula, P is the total number of samples, T is the total number of time periods, and y t1 Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.
[0020] This invention provides a short-term load forecasting method based on the random forest algorithm and rough set theory. It has the following advantages:
[0021] 1. This invention introduces a random forest algorithm to rank and filter the features for load prediction based on their importance, using a subset of highly important features as input to a deep learning model. This approach avoids interference from irrelevant or redundant features, allowing the model to focus on learning and predicting core influencing factors, thereby effectively improving the model's prediction accuracy.
[0022] 2. This invention introduces a correction step based on rough set theory. By adaptively constructing correction parameters and scaling factors, local fluctuations and abrupt changes in the predicted curve are corrected. Experimental results show that the predicted load curve after this correction has a higher fit with the actual load curve, and the prediction error is significantly reduced, effectively solving the problem of insufficient accuracy of existing methods when dealing with nonlinear and non-stationary data.
[0023] 3. This invention uses the prediction results of the deep learning model as feedback to dynamically adjust the feature importance evaluation strategy of the random forest algorithm and reconstruct a better feature subset. This iterative optimization mechanism enables the feature selection process and the model prediction process to interact and continuously improve, forming an adaptive learning loop that ensures the long-term stability and high accuracy of the model under different data and environments. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method steps of the present invention;
[0025] Figure 2 This is a schematic diagram illustrating the principle of prediction value correction in the rough set theory of this invention;
[0026] Figure 3 This is a comparison chart of the actual load and the predicted load before and after the correction according to the present invention. Detailed Implementation
[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] Example 1
[0029] See attached document Figure 1 , Figure 1 This is a flowchart of a short-term load forecasting method according to an embodiment of the present invention. The present invention provides a short-term load forecasting method based on the random forest algorithm and rough set theory, comprising the following steps:
[0030] S1. Collect historical load data through sensors, smart meters, or historical databases to construct load prediction characteristic quantities;
[0031] S2. Use the random forest algorithm to rank the load prediction features by importance and generate a subset of features that have a high impact on the prediction results.
[0032] S3. Use a deep learning model to make preliminary predictions on the generated feature subset and historical load data. Based on the loss between the prediction results and the true values, dynamically adjust the feature importance evaluation strategy of the random forest algorithm and reconstruct a better feature subset.
[0033] S4. Based on rough set theory, the initial predictions of the deep learning model and the reconstructed feature subset are used as inputs to adaptively construct correction parameters to correct the initial predictions.
[0034] S5. Use the corrected prediction value as the auxiliary target for the next round of training of the deep learning model for iterative optimization until the prediction error reaches the preset threshold, and output the final load prediction value.
[0035] This embodiment uses a random forest algorithm to select features that contribute significantly to the prediction results, reducing the impact of redundant information on the model. Subsequently, a deep learning model is used for initial predictions, and the feature importance evaluation strategy of the random forest is dynamically adjusted based on the difference between the predicted results and the true values, achieving continuous optimization of feature selection. Finally, rough set theory is introduced to refine the initial predictions of the deep learning model, specifically correcting local and abrupt changes in the prediction curve. The corrected predictions are used as auxiliary targets for the next round of training until the prediction error converges to a preset range, ultimately yielding a result with higher prediction accuracy.
[0036] For step S1, historical load data is collected using sensors, smart meters, or historical databases. This historical load data is daily load data, with a sampling period of, for example, 15 minutes, 30 minutes, or 1 hour. During the collection process, data cleaning techniques are used to remove outliers and missing values from the historical load data to ensure data validity and consistency.
[0037] After acquiring the historical load data, this invention constructs feature quantities for load forecasting. These feature quantities include: month and day information, highest temperature, lowest temperature, average temperature, average relative humidity, air quality, average wind speed, sunrise time, and sunset time for the corresponding dates in the historical load data. These feature quantities characterize the factors influencing changes in electricity load from multiple dimensions, including time, meteorology, and environment. These feature quantities constitute the initial input dataset for the deep learning model.
[0038] The historical load data and the feature quantities together constitute an information system for subsequent model training and prediction. This information system can be represented as:
[0039] S = (U, A);
[0040] Wherein, U is the sample space, i.e., the set of historical load data; A is the attribute set, i.e., the set of load prediction features. The attribute set A can be further divided into a conditional attribute set C and a decision attribute set D. Wherein, C is the constructed set of features, and D is the set of historical load data. This information system provides the foundation for feature importance evaluation based on the random forest algorithm and training of the deep learning model in subsequent steps.
[0041] For step S2, after constructing the load prediction features, the random forest algorithm is used to filter the importance of the features. The parameters of the random forest model are set as follows:
[0042] Total number of features J: Determined based on the load forecast feature set constructed in step one. This set includes 10 features: month, day, highest temperature, lowest temperature, average temperature, average relative humidity, air quality, average wind speed, sunrise time, and sunset time.
[0043] Number of categories C: To accommodate the needs of the classification model, this invention divides historical load data into two categories. This classification method can classify load data above a threshold into one category and load data below or equal to the threshold into another category based on the mean or median of the load data, thereby distinguishing load status.
[0044] Number of decision trees I: To achieve high prediction accuracy while ensuring model stability and computational efficiency, this embodiment sets the number of decision trees in the random forest to 500.
[0045] The feature selection process first calculates the Gini index for each decision tree node in the random forest to measure the purity of the samples within that node. A smaller Gini index indicates higher purity, meaning the samples within the node tend to belong to the same category. The formula for calculating the Gini index is as follows:
[0046]
[0047] In the formula, C represents the number of categories. This represents the probability estimate that sample m belongs to class c.
[0048] Based on the Gini index, the importance score of each feature in each decision tree node is calculated. The importance score is determined by comparing the change in the Gini index before and after a node branch. When a feature is used for node branching, if the Gini index of the child node after the branch is significantly lower than the Gini index of the parent node before the branch, it indicates that the feature contributes significantly to the node's purity, and its importance score increases accordingly. The feature X... j The formula for calculating the importance score of node m is as follows:
[0049]
[0050] In the formula, For characteristic quantity X j In the importance score of node m, G m Let G be the Gini index before branching at node m. l and G r are the Gini indices of the two new nodes l and r formed after node m branches.
[0051] The total importance of the feature in the entire random forest is obtained by summing the importance scores of the feature across all decision tree nodes. This summation process reflects the comprehensive contribution of the feature to the entire model. The feature X... j The importance calculation formula in random forest is as follows:
[0052]
[0053] In the formula, For characteristic quantity X j In a random forest, the total importance is represented by I, the number of decision trees, and M, the feature value X. j The set of nodes that have appeared in the i-th decision tree. It is the characteristic X j The importance of node m in the i-th tree. Based on the calculated importance score. All features are sorted in descending order, and the top six most important features are selected as the feature subset for subsequent deep learning model prediction.
[0054] For step S3, after feature selection, a deep learning model is used to perform preliminary load prediction on the optimized feature subset. The deep learning model can be, for example, a deep neural network (DNN), a long short-term memory network (LSTM), or another recurrent neural network (RNN) model. The input to the deep learning model includes the optimized feature subset and the historical load data corresponding to that subset.
[0055] During training, the deep learning model calculates a loss function based on the difference between its initial predictions and the actual historical load data. This invention uses the mean squared error (MSE) loss function to quantify this prediction difference. This loss function guides the model's parameter updates, thereby gradually bringing the model's predictions closer to the actual values. The formula for calculating the mean squared error loss function is as follows:
[0056]
[0057] In the formula, L is the mean squared error loss, P is the total number of samples, T is the total number of time intervals, and y t1Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.
[0058] The magnitude of the loss value reflects the accuracy of the model's predictions. During training, the model parameters are adjusted using the backpropagation algorithm to minimize the loss value. In the initial prediction stage, this invention does not directly use the output of the deep learning model as the final prediction result, but rather uses it as input for the next rough set correction to further improve prediction accuracy. Simultaneously, the loss value can serve as feedback to dynamically adjust the feature importance evaluation strategy of the random forest algorithm in step two, in order to reconstruct a better feature subset.
[0059] For step S4, please refer to the appendix. Figure 2 After the initial prediction by the deep learning model, a prediction correction step based on rough set theory is introduced. This step corrects local and abrupt changes in the initial predictions of the deep learning model. The correction process is achieved by adaptively constructing correction parameters and a scaling factor.
[0060] The correction parameters include three parameters: a, b, and c. The formula for calculating parameter a is as follows:
[0061]
[0062] In the formula, y t Let y be the load forecast value at time t. t+1 and y t+2 These are the load forecast values at times t+1 and t+2, respectively. Parameter 'a' measures the trend of the load forecast curve around time point t. The formula for calculating parameter 'b' is as follows:
[0063] b = sgn(y t+2 -2y t+1 +y t );
[0064] Where sgn(·) is the sign function. The parameter b is used to determine the direction of change of the load forecast curve near time point t. When the forecast value shows an upward trend, the value of b is positive; when the forecast value shows a downward trend, the value of b is negative. The formula for calculating the parameter c is as follows:
[0065]
[0066] In the formula, |y t | represents the absolute value of the predicted load at time t, max(y) t ) represents the maximum absolute value of the load forecast over a period of time. The parameter c reflects the relative magnitude of the load forecast at time t over the entire time period.
[0067] After determining the correction parameters a, b, c, this invention further introduces a scaling factor s. t The preliminary predictions are then corrected. The formula for calculating the scaling factor is as follows:
[0068]
[0069] In the formula, y t and y′ t These are the predicted and corrected values for time t, respectively. t+1 and y t+2 These are the preliminary predicted values at times t+1 and t+2, respectively. The scale factor s... t The calculation is based on the difference between the preliminary predicted value and the actual value, as well as the changing trend of the predicted curve, to adaptively adjust the magnitude and direction of the correction.
[0070] The correction process uses the correction parameters and scale factor to adjust the initial predictions of the deep learning model, thereby generating corrected predictions. These corrected predictions are closer to the true values of the historical load data and are used for iterative optimization in the next round of training.
[0071] For step S5, in this embodiment, after correcting the initial prediction value of the deep learning model, the corrected prediction value is used as the auxiliary target for the next round of training for iterative optimization, and the prediction error evaluation index is used to evaluate the model performance until the prediction error reaches a preset threshold or reaches a preset number of iterations, and the final load prediction value is output.
[0072] The prediction error evaluation indicators include Mean Absolute Percentage Error (MAPE), Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE). The formulas for calculating these indicators are as follows:
[0073]
[0074] In the formula, P is the total number of samples, T is the total number of time periods, and y t1 Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.
[0075]
[0076] In the formula, P is the total number of samples, T is the total number of time periods, and y t1 Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.
[0077]
[0078] In the formula, P is the total number of samples, T is the total number of time periods, and y t1 Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.
[0079]
[0080] In the formula, P is the total number of samples, T is the total number of time periods, and y t1 Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.
[0081] In each iteration, this invention uses the MAPE, MSE, MAE, and RMSE metrics to evaluate the prediction accuracy of the current model. The iteration process terminates when the values of these metrics fall below preset thresholds, or when the number of iterations reaches a preset value. At this point, the model's prediction value is determined as the final load forecast value and output. This iterative process ensures that the model's prediction accuracy is continuously improved through optimization, ultimately resulting in an accurate short-term load forecast.
[0082] Example 2
[0083] This embodiment provides an experiment that uses historical load data of a regional power grid over a continuous period as the dataset. This dataset contains detailed historical load records and related meteorological information. The dataset is divided into a training set and a test set, where the training set is used to train the model and the test set is used to evaluate the model's performance.
[0084] To comprehensively evaluate the performance of the method of this invention, two comparative methods were selected in the experiment:
[0085] Comparison Method 1: A method that uses a deep learning model alone for load forecasting, with all other steps remaining the same.
[0086] Comparison Method 2: A method that uses only the random forest algorithm for feature selection and then uses a deep learning model for prediction. This method does not incorporate rough set theory for correction, and all other steps are the same.
[0087] All methods are trained on the same training set and predicted on the same test set to ensure comparability of experimental results.
[0088] Experimental steps:
[0089] Data Preparation: First, the historical workload dataset was acquired and preprocessed. This preprocessing included data cleaning to identify and remove outliers and impute missing values, ensuring data integrity and consistency. Subsequently, the dataset was divided into training and test sets in chronological order.
[0090] Feature Construction and Selection: Based on the training set data, 10 load prediction features, including month, day information, highest temperature, and lowest temperature, are constructed. Next, a random forest model is initialized and trained. The importance score of each feature is calculated using the Gini index, and the 10 features are sorted in descending order according to the score. The top six features are selected to form an optimized feature subset.
[0091] Model Training and Preliminary Prediction: A deep learning model is built and trained using the selected feature subset and corresponding historical load data as input. The model updates its parameters by minimizing the mean squared error loss between the predicted and actual values. After training, the model is used to make preliminary predictions on the test set, generating a preliminary load prediction curve.
[0092] Forecast Correction: For the generated preliminary negative load forecast curve, a correction method based on rough set theory is applied. For each time point on the forecast curve, correction parameters a, b, and c are calculated based on the forecast values of its neighboring points, and the scaling factor st is calculated by combining the actual value and the forecast value at that point. These parameters are used to correct the preliminary forecast values, generating the corrected forecast load curve.
[0093] Iterative optimization and evaluation: Using the corrected predictions as the auxiliary target for the next round of training, steps 3 and 4 are repeated to form an iterative optimization loop. After each iteration, evaluation metrics such as the mean absolute percentage error (MAPE) and mean squared error (MSE) of the prediction results are calculated and recorded. Training is terminated when the error metrics reach the preset convergence threshold or the preset number of iterations is completed.
[0094] Comparative Experiment: Simultaneously, the procedures for both Comparative Method 1 and Comparative Method 2 were followed. Comparative Method 1 directly trains the deep learning model and makes predictions using all 10 features. Comparative Method 2 performs feature selection in step 2, then performs prediction in step 3, but without subsequent corrections or iterative optimizations.
[0095] Results Analysis: The load forecast curve output by the method of this invention is plotted on the same coordinate system as the forecast curves of Comparison Method 1 and Comparison Method 2, as well as the historical load data actual value curve (as shown in the attached figure). Figure 2 (as shown in the figure), and the data is recorded as shown in Table 1.
[0096] Table 1: Comparison of prediction errors of the three models
[0097]
[0098] See attached document Figure 3The curves shown in the figure represent the actual historical load data, the prediction curve obtained by the method of this invention, the prediction curve of comparison method one, and the prediction curve of comparison method two, respectively. Observation of these curves reveals that the prediction curve obtained by the method of this invention is closer to the actual historical load data in terms of fit.
[0099] The method presented in this application can more accurately capture the peaks and troughs of the load curve, especially during periods of drastic load changes, with the predicted curve's fluctuation trend highly consistent with the actual value curve. In contrast, the predicted curves of methods one and two exhibit significant deviations at certain local abrupt change points, failing to effectively follow the changes in the actual value. This method, by introducing rough set theory, effectively corrects these deviations, resulting in a smoother and more accurate predicted curve at these abrupt change points. From the overall trend of the curves, the predicted curve of this method has the smallest distance from the actual value curve, reflecting higher overall prediction accuracy.
[0100] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A short-term load forecasting method based on random forest algorithm and rough set theory, characterized in that, Includes the following steps: S1. Collect historical load data through sensors, smart meters, or historical databases to construct load prediction characteristic quantities; S2. Use the random forest algorithm to rank the load prediction features by importance and generate a subset of features that have a high impact on the prediction results. S3. Use a deep learning model to make preliminary predictions on the generated feature subset and historical load data. Based on the loss between the prediction results and the true values, dynamically adjust the feature importance evaluation strategy of the random forest algorithm and reconstruct a better feature subset. S4. Based on rough set theory, the initial predictions of the deep learning model and the reconstructed feature subset are used as inputs to adaptively construct correction parameters to correct the initial predictions. S5. Use the corrected prediction value as the auxiliary target for the next round of training of the deep learning model for iterative optimization until the prediction error reaches the preset threshold, and output the final load prediction value.
2. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 1, characterized in that, In step S1, the construction of load prediction features includes: Collect month and day information corresponding to historical load data through smart meters; The system collects historical load data for the corresponding dates, including the highest temperature, lowest temperature, average temperature, average relative humidity, air quality, and average wind speed. Obtain the sunrise and sunset times for the corresponding dates of historical load data from the historical database.
3. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 1, characterized in that, In step S2, the step of using the random forest algorithm to rank the load prediction features by importance and generate a subset of features that have a high impact on the prediction results further includes: Based on the attributes of load forecasting features, the Gini index is used to measure the purity of decision tree nodes in a random forest. The Gini index is used to evaluate the contribution of load forecasting features to load forecasting. Based on the changes in the Gini index, calculate the importance score of the load prediction feature in the random forest; The load forecasting features are sorted in descending order based on the importance score, and the features with high importance are selected as the feature subset.
4. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 3, characterized in that, The formula for calculating the Gini index is as follows: In the formula, C represents the number of categories. This represents the probability estimate that sample m belongs to class c.
5. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 1, characterized in that, In step S3, the step of using a deep learning model to make preliminary predictions on the generated feature subset and historical load data further includes: The selected feature subset is used as the input features of the deep learning model to construct a deep neural network model and set the initial parameters. The difference between the initial predicted value output by the deep learning model and the actual value of historical load data is calculated using the mean squared error loss function, and the parameters of the deep learning model are dynamically adjusted to optimize the prediction results.
6. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 1, characterized in that, In step S3, the step of dynamically adjusting the feature importance evaluation strategy of the random forest algorithm further includes: The initial predictions of the deep learning model are compared with the actual values of historical load data, and the differences are calculated. Based on the magnitude and trend of the calculated differences, the weights or parameters of each decision tree in the random forest algorithm are adaptively adjusted to change the importance scores of the load prediction features. Based on the adjusted random forest algorithm, a better feature subset is regenerated and used as input for the next round of iterative optimization.
7. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 1, characterized in that, In step S4, the step of adaptively constructing the correction parameters by taking the initial predictions of the deep learning model and the reconstructed feature subset as input further includes: Use the initial predictions output by the deep learning model as the dataset to be corrected; Based on the changing trend between continuous predicted values in the dataset to be corrected, correction parameters and scaling factors are adaptively constructed. Using the aforementioned correction parameters a, b, c and scale factor S t It corrects local and mutation points in the dataset to be corrected.
8. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 7, wherein the correction parameters a, b, c and the scale factor S t The calculation formula is: b=sgn(y t+2 -2y t+1 +y t ); In the formula, y t and y′ t The predicted and corrected values at time t are respectively, y t+1 and y t+2 These are the predicted values at times t+1 and t+2, respectively.
9. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 1, characterized in that, In step S5, the step of using the corrected predicted value as an auxiliary target for the next round of training of the deep learning model for iterative optimization further includes: The corrected predicted values are used as auxiliary targets for the next round of training of the deep learning model and compared with the true values of historical load data. The difference between the auxiliary target and the true value of historical load data is evaluated using one of the following indicators: mean absolute percentage error, mean square error, mean absolute error, and root mean square error. When the prediction error is less than a preset threshold, the iteration stops and the final load prediction value is output.
10. The short-term load forecasting method based on random forest algorithm and rough set theory according to claim 9, characterized in that, The formula for calculating the mean absolute percentage error is: In the formula, P is the total number of samples, T is the total number of time periods, and y t1 Let y′ be the true value of the historical load data at time t. t This is the correction value at time t.