Feature tree-based iterative learning load prediction method, device, equipment and medium
Patent Information
- Application Number
- CN202311219409.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-09-20
AI Technical Summary
这些方法均以不同的选择标准进行不可逆筛选,虽然一定程度上降低了所选特征的冗余度,但这些预测方法并未考虑特征之间的多重协同作用,存在忽略有用信息的偶然性,未能充分挖掘影响负荷出力的要素特性,从而影响预测精度
[0042]This invention proposes an improved SFS feature tree feature selection algorithm, optimizing the feature selection method by transforming the traditional chain-like structure of feature selection into a tree-like structure. It provides a bidirectional dynamic adjustment scheme for expanding, adding, and deleting features from the optimal feature set, increasing the possibility of escaping local optima, effectively reducing redundant features, and fully considering the multiple collaborations between features, thereby enhancing the reliability and performance of the model's input feature set. Furthermore, this invention proposes a multi-feature iterative learning framework, which can fully explore the collaborative relationships between features, periodically divide differentiated feature combinations, enabling important features to achieve greater information gain during training and continuously guide subsequent learning processes, further improving the accuracy of the prediction model.
Smart Images

Figure CN117408370B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of load forecasting technology, and in particular to a method, apparatus, device and medium for short-term load forecasting based on multi-feature iterative learning of an improved SFS feature tree. Background Technology
[0002] With the development of smart grids and demand response technologies, power loads are increasingly exhibiting elasticity, flexibility, uncertainty, and controllability. Adjustable loads, as a flexible resource, can participate more frequently in the power system's supply and demand balance. Therefore, conducting load characteristic analysis and load forecasting research is particularly important for deeply exploring the hidden patterns of flexible load resources and fully leveraging their regulating capabilities. Short-term load forecasting, in particular, has become a key research topic because it can provide necessary support for demand response and ensure the efficient and economical operation of smart grids.
[0003] Current research on short-term load forecasting can be broadly categorized into two types: statistical and machine learning. Statistical methods, such as linear regression, exponential smoothing, and autoregressive integral moving average models, focus on data fitting rather than feature analysis. Typical machine learning methods include neural networks, support vector machines, and random forests. In recent years, deep learning has been the dominant machine learning approach. Algorithms represented by long short-term memory networks and gated recurrent units, as well as tree ensemble algorithms such as XGBoost, have achieved good results in load forecasting.
[0004] However, due to the large hypothesis space in the prediction, individual models can exhibit poor generalization performance due to unilateralism and randomness. Furthermore, the selection of training features is primarily done manually or automatically and embedded into the learner's training process. Redundant features and multicollinearity can cause changes in feature weights, affecting the accuracy of load prediction. Standard association techniques such as grey relational analysis and neurofuzzy inference systems in deep learning are used to extract input features before training using specific selection criteria. These methods all perform irreversible selection using different criteria. While this reduces the redundancy of selected features to some extent, these prediction methods do not consider the multiple synergistic effects between features, leading to the possibility of ignoring useful information and failing to fully exploit the characteristics of factors influencing load output, thus affecting prediction accuracy. Summary of the Invention
[0005] To overcome the shortcomings of the existing technology, one of the objectives of this invention is to provide an iterative learning load prediction method based on feature trees. This method improves the SFS feature tree feature selection algorithm, optimizes the feature selection method, and then trains a load power prediction model with high accuracy.
[0006] One of the objectives of this invention is achieved through the following technical solution:
[0007] An iterative learning load prediction method based on feature trees includes the following steps:
[0008] Receive load characteristics, weather characteristics, and calendar characteristics;
[0009] Feature selection is performed using the Sequential Forward Selection (SFS) algorithm to obtain a feature set, wherein the SFS algorithm performs feature selection using a feature tree selection algorithm.
[0010] The feature set is input into the XGBoost algorithm model for training;
[0011] Training is complete, and the load power prediction model is obtained.
[0012] Furthermore, the load characteristics include historical load power, the weather characteristics include weather type, temperature, and humidity, and the calendar characteristics include hour, weekday, month, and holidays.
[0013] Furthermore, the feature selection includes internal feature selection and external feature selection, where the load feature is an internal feature and the weather feature and calendar feature are external features.
[0014] Furthermore, the feature tree is an optimal feature generation tree, which includes:
[0015] Number the features;
[0016] Initialize the spanning tree, and use the empty feature with number 0 as the root node;
[0017] Enumerate any new features that can be added and update the spanning tree;
[0018] The optimal features are selected based on the generated tree;
[0019] The spanning tree is updated and expanded based on the optimal features.
[0020] Further, the spanning tree is initialized, including: performing numerical initialization to satisfy U. i,j =+∞(i, j∈X), C i =+∞(i∈X), e=+∞, where, U i,j This represents the feature set S represented by feature j on the spanning tree. j Expanding the subset, X is the original feature set, C i E represents the best evaluation score of feature i outside the generated tree, E represents the optimal selection of feature set by the model, and e is the evaluation score of E.
[0021] Enumerating new features that can be added and updating the spanning tree includes: calculating U k,prev =V({S prev, k}), when U k,prev <C k Update C k =U k,prev Src k =prev, where prev represents the newly added feature in the feature tree, and Src i C represents i In the corresponding spanning tree, k represents the new features that can be added, and V represents the evaluation score.
[0022] The optimal feature is selected based on the spanning tree, satisfying: C w =min C i (i∈X, Src) i ≠f i ), where w is the optimal feature, satisfying:
[0023] If w does not exist, stop the calculation;
[0024] like Add w as the parent node Src w The child nodes of f w =Src w A = A + {w}, prev = w, where f i Let i be the parent node of i in the spanning tree, and let A represent the set of features that have been selected to be added to the spanning tree;
[0025] If w∈A, Src w Expand a new tree chain around feature w, delete the original feature subtrees of feature w, and let the atomic tree feature set be Sub. w f w =Src w A = A - Sub w +{w}, prev=w, when k∈Sub w (k≠w), let f k =-1, U i,k =+∞(i∈X), recalculate U k,i (i∈A);
[0026] The spanning tree is updated and expanded based on the optimal features, satisfying: when C w <e, then let e = C w E = S w And continue to expand the spanning tree, otherwise output the optimal selection feature set E.
[0027] Furthermore, the calculation of the evaluation score V satisfies:
[0028] Where H is the number of training sample groups, h represents the h-th validation, and Em hThis represents the training error.
[0029] Furthermore, the feature selection and training are performed iteratively using a multi-feature iterative learning framework, including the following steps:
[0030] Input the feature set and its corresponding load forecast results;
[0031] The optimal feature set is obtained by using the Sequential Forward Selection (SFS) algorithm for feature selection.
[0032] The optimal feature set is substituted into the XGBoost learner for training to obtain the latest load prediction results;
[0033] The model training process continues iteratively, updating load prediction results and calculating evaluation scores. The iteration ends when the evaluation score in the next iteration is equal to or worse than the previous evaluation score, thus completing the model training.
[0034] The second objective of this invention is to provide a short-term load forecasting device that enhances feature extraction to obtain a high-precision forecasting model.
[0035] The second objective of this invention is achieved by the following technical solution:
[0036] A short-term load forecasting device, comprising:
[0037] The receiving module is used to receive load characteristics, weather characteristics, and calendar characteristics.
[0038] The training module is used to select features using the Sequential Forward Selection (SFS) algorithm to obtain a feature set, wherein the SFS algorithm selects features using a feature tree selection algorithm; the feature set is then input into the XGBoost algorithm model for training; after training is completed, a load power prediction model is obtained.
[0039] A third objective of this invention is to provide an electronic device for performing one of the objectives of the invention, comprising a processor, a storage medium, and a computer program, wherein the computer program is stored in the storage medium and, when executed by the processor, implements the above-described iterative learning load prediction method based on feature trees.
[0040] A fourth objective of this invention is to provide a computer-readable storage medium storing one of the objectives of the invention, wherein a computer program is stored thereon, which, when executed by a processor, implements the above-described iterative learning load prediction method based on feature trees.
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] This invention proposes an improved SFS feature tree feature selection algorithm, optimizing the feature selection method by transforming the traditional chain-like structure of feature selection into a tree-like structure. It provides a bidirectional dynamic adjustment scheme for expanding, adding, and deleting features from the optimal feature set, increasing the possibility of escaping local optima, effectively reducing redundant features, and fully considering the multiple collaborations between features, thereby enhancing the reliability and performance of the model's input feature set. Furthermore, this invention proposes a multi-feature iterative learning framework, which can fully explore the collaborative relationships between features, periodically divide differentiated feature combinations, enabling important features to achieve greater information gain during training and continuously guide subsequent learning processes, further improving the accuracy of the prediction model. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the XGBoost algorithm and the short-term load method of sequential forward selection in Embodiment 1;
[0044] Figure 2 This is a flowchart of the feature tree-based iterative learning load prediction method in Example 1;
[0045] Figure 3 This is a schematic diagram illustrating the update extension of the feature tree algorithm in Implementation Example 1;
[0046] Figure 4 This is a schematic diagram of the result of the feature tree algorithm in Example 1;
[0047] Figure 5 This is the architecture diagram of the multi-feature iterative learning load prediction method based on feature trees in Example 2;
[0048] Figure 6 This is a diagram illustrating the iterative process of Example 2;
[0049] Figure 7(a) is a comparison of the load forecast curves for July 11.
[0050] Figure 7(b) is a comparison chart of MAPE errors in the load forecast on July 11.
[0051] Figure 7(c) is a comparison chart of the load forecast curves on May 1st;
[0052] Figure 7(d) is a comparison chart of MAPE errors in the load forecast for May 1st;
[0053] Figure 8 This is a structural block diagram of the short-term load forecasting device in Embodiment 4;
[0054] Figure 9 This is a structural block diagram of the electronic device in Embodiment 5. Detailed Implementation
[0055] The present invention will now be described in more detail with reference to the accompanying drawings. It should be noted that the following description of the present invention with reference to the accompanying drawings is merely illustrative and not restrictive. Various embodiments can be combined with each other to form other embodiments not shown in the following description.
[0056] Example 1
[0057] Example 1 provides an iterative learning load prediction method based on feature trees, which aims to accurately analyze the collaborative relationship between features by selecting feature sets through an improved SFS algorithm based on feature trees, and effectively reduce redundancy in feature selection.
[0058] The following section first introduces the XGBoost algorithm and the feature tree-based iterative learning load prediction method based on forward feature selection.
[0059] Please refer to Figure 1 The diagram illustrates the XGBoost algorithm and the Sequential Forward Selection (SFS) method for short-term load forecasting. SFS focuses on the forward selection algorithm in the input of feature tree-based iterative learning load forecasting methods. SFS is a common feature set selection method. The SFS algorithm initializes the result as an empty set, and the unselected feature set is initialized with the three input features mentioned above: load, weather, and calendar. Starting from the empty set, SFS uses a predefined evaluation function to select a new feature from the unselected feature set that optimizes the prediction result each time. When no feature can be selected that improves the prediction result, the SFS algorithm terminates, and the final input feature set becomes the algorithm result. SFS is a greedy chain selection algorithm, which is prone to getting trapped in local optima.
[0060] For training iterative learning load forecasting methods based on feature trees, the XGBoost algorithm model in load forecasting is as follows:
[0061] Where, x i It is the input, specifically the input feature set in iterative learning load prediction methods based on feature trees; y i This is the predicted output, i.e., the predicted load power. T is the number of CART (Classification and Regression Tree) arrays, and f... t (x) represents the space of each tree. φ(x) denotes the objective function of XGBoost. Therefore, the model can be expressed as:
[0062] in, It represents the difference between the predicted value and the target value. Ω(f) denotes the complexity of the tree. T nφ is the number of leaf nodes. w is the score of the leaf nodes. γ and λ are penalty coefficients. The goal of XGBoost is to find the minimum value of L(φ). After second-order Taylor expansion and removal of constant terms, the model can be expressed as:
[0063]
[0064] Where j represents the number of leaf nodes traversed. w j Represents score, I j ={i|q(x i )=j} is the j-th th The sample of leaf nodes. During training, XGBoost enumerates all possible split tree points and selects the optimal one.
[0065] The aforementioned traditional short-term load methods based on the XGBoost algorithm and sequential forward selection form an irreversible input feature set within the sequential forward selection framework. The prediction model is also trained only once based on this feature set, resulting in local optima and failing to fully explore feature coupling relationships, thus affecting prediction accuracy.
[0066] Based on the above algorithm, this embodiment proposes a multi-feature iterative learning load prediction method based on an improved SFS feature tree. This method optimizes the sequential forward feature selection method into an improved SFS feature tree feature selection method, transforming the irreversible selection method based on chain expansion into a dynamic reversible selection method based on feature tree expansion. This optimizes the problem of traditional feature selection models easily getting trapped in local optima. Please refer to... Figure 2 As shown, an iterative learning load prediction method based on feature trees includes the following steps:
[0067] S1. Received load characteristics, weather characteristics, and calendar characteristics;
[0068] To differentiate features and enhance training accuracy, load, weather, and calendar information are typically used as the original input feature set for the model. Load features represent historical load power and reflect load regularity; in this embodiment, they are defined as internal features. Weather features include meteorological factors such as weather type, temperature, and humidity. Calendar features typically include hours, days of the week, months, and holidays; in this embodiment, these objective factors are defined as external features.
[0069] S2. Feature selection is performed using the Sequential Forward Selection (SFS) algorithm to obtain a feature set, wherein the SFS algorithm performs feature selection using a feature tree selection algorithm.
[0070] The aforementioned feature tree is the optimal feature spanning tree (hereinafter referred to as the spanning tree), which is a tree with features as nodes. The set of features represented by the nodes traversed by each path from the root node to a given node represents an optimal subset of features that has been iteratively selected. It includes:
[0071] The features are numbered; assuming there is an original feature set X, the features are numbered from 1 to N. For example, feature set A represents the set of features that have been selected to be added to the spanning tree, and correspondingly, the set of features that have not been selected is XA.
[0072] Initialize the spanning tree, and use the empty feature with number 0 as the root node;
[0073] Enumerate any new features that can be added and update the spanning tree;
[0074] The optimal features are selected based on the generated tree;
[0075] The spanning tree is updated and expanded based on the optimal features.
[0076] Specifically, initializing the spanning tree includes: performing numerical initialization to satisfy U. i,j =+∞(i, j∈X), C i =+∞(i∈X), e=+∞, where, U i,j This represents the feature set S represented by feature j on the spanning tree. j Expanding the subset, the new feature set {S} formed by adding the external feature i is called the subset. j The evaluation score of i}, i.e., U i,j =V({S j ,i})(i,j∈[1,N],i≠j);X is the original feature set, C i C is the best evaluation score for feature i outside the spanning tree. i =max{U i,j}(i∈(XA), j∈A), at this time Src i C represents i The corresponding features in the spanning tree, i.e. E represents the optimal feature set selected by the model, e is the evaluation score of E, and e = V(E); the spanning tree is initialized with a root node numbered 0 and containing empty features. f i =Src i =-1 (i∈X), prev=0, f i It is the parent node of t in the spanning tree.
[0077] Enumerating new features that can be added and updating the spanning tree includes: calculating U k,prev =V({S prev, k}), when U k,prev <C k Update C k =U k,prev Src k =prev, where prev represents the newly added feature in the feature tree, and Src i C represents i In the corresponding spanning tree, k represents the new features that can be added, and V represents the evaluation score.
[0078] The optimal feature is selected based on the spanning tree, satisfying: C w =min C i (i∈X, Src) i ≠f i ), where w is the optimal feature, satisfying:
[0079] If w does not exist, it means that all features in feature set X have been added to the spanning tree, and the feature subset represented by each path in the tree has reached its optimal evaluation score, i.e., Src i =f i (i∈X). Therefore, the feature selection algorithm based on the improved SFS feature tree ends and the calculation stops;
[0080] like If feature w is not in the spanning tree, add w as the parent node Src. w The child nodes of f w =Src w A = A + {w}, prev = w, where f i Let i be the parent node of i in the spanning tree, and let A represent the set of features that have been selected to be added to the spanning tree;
[0081] If w∈A, it means that feature w is already in the spanning tree. This case indicates that it is related to the feature set S in the existing spanning tree. w In contrast, there exists a feature set (a new tree path) with better evaluation scores. In this case, the spanning tree uses a "loop-breaking" approach to feature Src. w Expand a new tree chain around feature w and delete the existing feature subtrees under feature w. (Src) w Expand a new tree chain around feature w, delete the original feature subtrees of feature w, and let the atomic tree feature set be Sub. w f w =Src w A = A - Sub w +{w}, prev=w, when k∈Sub w (k≠w), let f k =-1, U i,k =+∞(i∈X), recalculate U k,i(i∈A); After updating all U values, update all C values in the manner described in the enumerated extensible features.
[0082] The spanning tree is updated and expanded based on the optimal features, satisfying: when C w <e, then let e = C w E = S w And continue to expand the spanning tree, otherwise output the optimal selection feature set E.
[0083] Specifically, to avoid the risk of model overfitting under a fixed validation set, the K-FoldCross Validation method is often used. This involves dividing the training samples into H groups of equal size, selecting each group sequentially as the test set for validation, and using the remaining H-1 groups as the training set. During the h-th validation, the feature set S is used as the input feature set to train the XGBoost-based short-term load prediction model. The mean absolute percentage error (MAPE) between the predicted and actual load values on the test set is used as the training error, denoted as Em. h The evaluation score V is Em h The average value is calculated to satisfy:
[0084] Where H is the number of training sample groups, h represents the h-th validation, and Em h y represents the training error. i This represents the actual load value of the test set, while Let i represent the predicted load value of the test set in the h-th verification, where i∈[1,n] and n is the number of load data samples in the test set.
[0085] Please refer to Figure 3 and Figure 4 The diagram showing the update extension and results of the feature tree algorithm uses an initial feature set × = 1 to 10 and N = 10 as a typical example. Figure 3 The process of the first three feature selections of the improved SFS feature tree described in this method is shown, with the step number indicated by the superscript in the upper left corner. Figure 4 The left figure shows an intermediate stage of the feature selection process and identifies the two optimal feature sets that exist on the feature generation tree at this point. Figure 4 The image on the right shows the final result after all feature selections have been completed.
[0086] S3. Input the feature set into the XGBoost algorithm model for training;
[0087] S4. Training complete, load power prediction model obtained.
[0088] In summary, this embodiment proposes an improved SFS feature tree feature selection algorithm, optimizes the feature selection method, changes the chain structure to a tree structure, and provides a two-way dynamic adjustment scheme for expanding, adding, and deleting the optimal feature set. This increases the possibility of escaping local optima, effectively reduces redundant features, and enhances the reliability and performance of the model's input feature set.
[0089] Example 2
[0090] Example 2 proposes a multi-feature iterative learning framework based on improved SFS feature tree selection.
[0091] The model proposed in this embodiment transforms the traditional one-time feature selection process into multiple iterative selections, which delves deeper into feature correlations and enhances feature information transmission. It continuously strengthens the synergistic relationship between internal and external features during load prediction. In each iteration, the load features trained using the differentiated feature subsets formed in the previous stage are used as new input load (external) features for the iterative model. Combined with the remaining internal features, the optimal feature subset for this iteration is selected, more accurately grasping the feature influence weights and gains, and establishing the model for this stage.
[0092] Please refer to Figure 5 The diagram shows the architecture of a multi-feature iterative learning method for short-term load forecasting. Feature selection and training are performed iteratively using a multi-feature iterative learning framework, including the following steps:
[0093] Input the feature set and its corresponding load forecast results;
[0094] Specifically, in the z-th iteration, the input feature set l z-1 The load power prediction results obtained from the training of the z-1 layer cascaded model in the previous stages represent the internal characteristics; when z=1, l z-1 That is, l0 represents the historical load power. Feature z-1 This represents the selectable feature set in this iteration, consisting of the new internal features and the remaining unselected external features after the first z-1 iterations, e. z-1 This represents the optimal evaluation score after the first z-1 iterations.
[0095] The optimal feature set is obtained by using the Sequential Forward Selection (SFS) algorithm for feature selection.
[0096] Specifically, the optimal feature subset for this iteration is calculated using the feature selection algorithm based on the improved SFS feature tree described in Example 1. The specific steps are as follows: Let l z-1 As the root of the newly generated tree, Feature z-1 If the features are optional for generating the tree, then the optimal subset of features selected by the algorithm is labeled F. z The corresponding best evaluation score is e zF z It consists of three types of features, in addition to the preceding predicted output value l z-1 In addition, one is the internal historical load output feature set F z,int The other is the external feature set F z,ext In particular, F z It must have external characteristics, if F z If only internal features are included, the prediction model will degenerate into an overfitted time series model without objective feature support, resulting in ineffective training following the same data mining pattern.
[0097] The optimal feature set is substituted into the XGBoost learner for training to obtain the latest load prediction results;
[0098] Specifically, the optimal feature set F selected in this iteration z Substituting the values into the XGBoost learner for training yields entirely new load prediction results, which are labeled as feature l. z e z F represents z The evaluation score.
[0099] The model training process continues iteratively, updating the load prediction results and calculating the evaluation score. The iteration ends when the evaluation score of the next iteration is equal to or worse than the previous evaluation score, thus completing the model training.
[0100] Specifically, after the z-th iteration, the selectable feature set is Feature z =Feature z-1 -F z,ext -l z-1 +l z At the same time z It will also be used to update the values of internal load characteristics at all times, achieving information gain. When e z ≥e z-1 If the iteration ends when the time condition is met, the iterative learning process ends; otherwise, the (z+1)th iteration is performed. The termination condition for the iterative learning model is e. z ≥e z-1 This indicates that the training effect cannot be improved.
[0101] Please refer to Figure 6 The iterative process diagram shown assumes that the multi-feature iterative learning process is completed through t iterations. The final selected features are divided into t layers, which can be written as a subset sequence [F1, F2, ..., F]. t This is a cascaded model. Based on the improved SFS feature tree multi-feature iterative learning framework, it accurately reconstructs the priority and combination of features through differentiated feature subsets, enabling features to participate in the subsequent training process, achieving information gain, and improving load prediction performance.
[0102] In summary, this embodiment proposes a multi-feature iterative learning framework based on an improved SFS feature tree. By fully exploring the synergistic relationship between features through a cascaded prediction model, it divides differentiated feature combinations in stages, enabling important features to achieve greater information gain during training and continuously guide the subsequent learning process. At the same time, it improves the fault tolerance rate of feature set selection through multiple selections, allowing feature information to be fully expressed and further improving the prediction effect.
[0103] Example 3
[0104] Example 3 is an experimental illustration of this method.
[0105] This study uses electricity load and meteorological data for a certain region from January 1, 2012 to December 31, 2014 as the dataset for example analysis. The load data is sampled every 15 minutes, generating 96 sets per day; the meteorological data is one set per day, including daily maximum temperature, daily minimum temperature, daily average temperature, humidity, and rainfall. Using the two years of data from January 1, 2012 to December 31, 2013 as training data, the load situation for the entire year of 2014 is predicted.
[0106] The formula for calculating the model performance evaluation index is as follows:
[0107]
[0108] Where e MAPE e represents the mean absolute percentage error. RMSE a represents the root mean square error. t This represents the actual load value, while This represents the model's predicted load value. n is the number of test data points.
[0109] Table 1 shows the initial feature set for the example, which includes load, weather, and calendar features as the original input features. Load features represent historical load power, reflecting the regularity of the load. Weather features include meteorological factors such as rainfall, temperature, and humidity. Calendar features typically include hours, days of the week, months, and holidays.
[0110] Table 1 Initial Feature Set
[0111]
[0112] Table 1 illustrates the feature selection results and load prediction accuracy of the proposed model in each iteration, where the XGBoost tree depth is 6. The learning rate is assumed to be 0.09, and the maximum number of trees is limited to 600. The cross-validation coefficient K is 10. The prediction result (i) refers to the latest prediction value after the i-th iteration. The load trend (i) with subscripts represents the predicted load at the corresponding time of the prediction result (i), where the load trend (0) is the actual historical load.
[0113] Table 2. Results of multi-feature iterative selection based on improved SFS feature tree
[0114]
[0115] The following is a validation of the effectiveness of the iterative framework: As shown in Table 2, the proposed method performed three different iterative selections of feature variables and established a cascaded model. With deeper iterations, all load forecasting errors gradually decreased, and forecasting performance continuously improved. During the iterative learning process, the external feature combinations were {minutes, hours, months, weekdays, holidays}, {minimum temperature, average temperature, year, day}, and {maximum temperature, rainfall}. These differentiated feature sets, along with load power features, served as iterative inputs for forecasting, while the features "weekday" and "humidity" were not selected. The results show that the model generated in the first iteration laid the foundation for load forecasting, while the subsequent two iterations further improved the accuracy of load forecasting.
[0116] The following is a validation of the effectiveness of the improved SFS feature tree selection algorithm: To more comprehensively verify the effectiveness of the proposed improved SFS feature tree selection algorithm, it was compared with widely used feature selection methods such as Mutual Information Maximization (MIM), Minimum Redundancy Maximum Correlation (mRMR), Joint Mutual Information (JMI), Conditional Information Maximum Feature Extraction (CIFE), and Sequential Forward Selection (SFS). The XGBoost learner was used for all feature selection algorithms. The iterative feature selection results and load prediction accuracy are shown in Table 3.
[0117] Table 3. Iterative feature selection results and load forecasting accuracy of different methods
[0118]
[0119]
[0120] The results show that:
[0121] (1) ISFS, SFS and JMI had the most effective iterations (3). The improved SFS feature tree algorithm had the best prediction effect after each iteration selection and the greatest accuracy improvement.
[0122] (2) The feature selection in the first iteration plays a decisive role in the prediction performance. Subsequent stages correct the prediction error based on this. Some feature selection methods are relatively simple due to the filtering mutual information screening method. In the critical first stage, redundant features are easily selected. For example, the historical load information of MIM, JMI and CIFE is seriously redundant. At the same time, the weather information of MIM and CIFE is also redundant, which has a certain negative impact on the overall prediction accuracy.
[0123] (3) Some feature selection methods weigh relevance and redundancy, which may underestimate the usefulness of features and lead to the omission of features. For example, mRMR and JMI omit the important "weekday" feature, while CIFE omits the "hour" feature.
[0124] (4) SFS is prone to getting trapped in local optima, which continuously affects the accuracy of feature analysis and makes the selected feature combination prediction performance lacking. For example, only a few features are selected in the first stage, and redundant features such as "humidity" are selected in the third stage.
[0125] (5) Improved SFS provides more detailed feature segmentation and more accurate analysis of the synergistic relationship between features, effectively reducing redundancy in feature selection.
[0126] The following is a validation of the reliability and robustness of this method: considering the differences in load patterns across different seasons, statistical analysis was performed for each of the four quarters of the year. Table 4 shows a comparison of load forecasting accuracy for different feature selection methods in the four quarters.
[0127] Table 4 Comparison of Load Forecasting Accuracy of Different Feature Selection Methods in the Fourth Quarter
[0128]
[0129] The table shows the average values of quarterly and annual load data, in kW. The results show that the error index of this method is significantly lower than other feature selection methods in all four quarters. The annual eMAPE and eRMSE for the test dataset are 0.56% and 91.83kW, respectively, indicating a significant improvement in overall prediction performance. Statistical data shows that all methods have good prediction accuracy, with an average annual error rate of less than 1%, indicating that the regional trend can be predicted relatively accurately, and the annual electricity consumption is strongly correlated with the selected feature set. In the third quarter, the peak electricity consumption period, the prediction error is relatively large. At this time, the prediction performance of this method is significantly better than other models, with eMAPE and eRMSE decreasing to 0.85% and 164.80kW, respectively, demonstrating a significant improvement in prediction performance.
[0130] The following is a verification of the prediction performance of this method on typical days: Considering the difference in load patterns between weekdays and holidays, the prediction results for two typical load patterns—July 11 (weekday) and May 1 (holiday)—are selected for comparison of the effectiveness of the feature selection method. Figures 7(a)-7(d)As shown, compared with other feature selection methods, in the prediction on July 11, this method's prediction results were significantly closer to the actual values when the load peaked and troughed, and the overall trend was smoother. This indicates that the differentiated feature subset selected by the improved SFS feature tree more accurately grasped the impact of the complex synergistic effect between features on the load. This is also the key reason why this method significantly reduced the prediction error in the third quarter. In the prediction on May 1, when the load curve fluctuated more or reached an inflection point, this method was able to track the trend of load changes more effectively and with fewer spikes. This indicates that the feature subset selected by this method is more sensitive to the load changes during holidays with strong randomness and handles details better.
[0131] Example 4
[0132] Example 4 discloses a device corresponding to the feature tree-based iterative learning load prediction method in the above examples. It is a virtual device structure as described in the above examples; please refer to [link / reference]. Figure 8 As shown, it includes:
[0133] Receiver module 310 is used to receive load characteristics, weather characteristics and calendar characteristics;
[0134] The training module 320 is used to select features using the Sequential Forward Selection (SFS) algorithm to obtain a feature set, wherein the SFS algorithm selects features using a feature tree selection algorithm; the feature set is input into the XGBoost algorithm model for training; after training is completed, a load power prediction model is obtained.
[0135] Preferably, the feature tree is an optimal feature generation tree, which includes:
[0136] Number the features;
[0137] Initialize the spanning tree, and use the empty feature with number 0 as the root node;
[0138] Enumerate any new features that can be added and update the spanning tree;
[0139] The optimal features are selected based on the generated tree;
[0140] The spanning tree is updated and expanded based on the optimal features.
[0141] Preferably, initializing the spanning tree includes: performing numerical initialization to satisfy U i,j =+∞(i, j∈X), C i =+∞(i∈X), e=+∞, where, U i,j This represents the feature set S represented by feature j on the spanning tree. j Expanding the subset, X is the original feature set, C iE represents the best evaluation score of feature i outside the generated tree, E represents the optimal selection of feature set by the model, and e is the evaluation score of E.
[0142] Enumerating new features that can be added and updating the spanning tree includes: calculating U k,prev =V({S prev , k}), when U k,prev <C k Update C k =U k,prev Src k =prev, where prev represents the newly added feature in the feature tree, and Src i C represents i In the corresponding spanning tree, k represents the new features that can be added, and V represents the evaluation score.
[0143] The optimal feature is selected based on the spanning tree, satisfying: C w =min C i (i∈X, Src) i ≠f i ), where w is the optimal feature, satisfying:
[0144] If w does not exist, stop the calculation;
[0145] like Add w as the parent node Src w The child nodes of f w =Src w A = A + {w}, prev = w, where f i Let i be the parent node of i in the spanning tree, and let A represent the set of features that have been selected to be added to the spanning tree;
[0146] If w∈A, Src w Expand a new tree chain around feature w, delete the original feature subtrees of feature w, and let the atomic tree feature set be Sub. w f w =Src w A = A - Sub w +{w}, prev=w, when k∈Sub w (k≠w), let f k =-1, U i,k =+∞(i∈X), recalculate U k,i (i∈A);
[0147] The spanning tree is updated and expanded based on the optimal features, satisfying: when C w <e, then let e = C w E = S w And continue to expand the spanning tree, otherwise output the optimal selection feature set E.
[0148] Preferably, the feature selection and training are performed iteratively using a multi-feature iterative learning framework, including the following steps:
[0149] Input the feature set and its corresponding load forecast results;
[0150] The optimal feature set is obtained by using the Sequential Forward Selection (SFS) algorithm for feature selection.
[0151] The optimal feature set is substituted into the XGBoost learner for training to obtain the latest load prediction results;
[0152] The model training process continues iteratively, updating the load prediction results and calculating the evaluation score. The iteration ends when the evaluation score of the next iteration is equal to or worse than the previous evaluation score, thus completing the model training.
[0153] Example 5
[0154] Figure 9 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of the present invention, as shown below. Figure 9 As shown, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the computer device can be one or more. Figure 9 Taking a processor 410 as an example; the processor 410, memory 420, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 9 Taking the example of a connection between China and Israel via a bus.
[0155] The memory 420, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules. The processor 410 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 420, thereby implementing the feature tree-based iterative learning load prediction method described in Embodiments 1 to 3 above.
[0156] The memory 420 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 420 may further include memory remotely located relative to the processor 410, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0157] The input device 430 can be used to receive input user identity information, weather data, and load data, etc. The output device 440 may include a display screen or other display device.
[0158] Example 6
[0159] Embodiment 6 of the present invention also provides a storage medium containing computer-executable instructions, which can be used by a computer to execute a feature tree-based iterative learning load prediction method, the method comprising:
[0160] Receive load characteristics, weather characteristics, and calendar characteristics;
[0161] Feature selection is performed using the Sequential Forward Selection (SFS) algorithm to obtain a feature set, wherein the SFS algorithm performs feature selection using a feature tree selection algorithm.
[0162] The feature set is input into the XGBoost algorithm model for training;
[0163] Training is complete, and the load power prediction model is obtained.
[0164] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the feature tree-based iterative learning load prediction method provided in any embodiment of the present invention.
[0165] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause an electronic device (which may be a mobile phone, personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0166] It is worth noting that in the embodiments of the above-described iterative learning load prediction method based on feature trees, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0167] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
Claims
1. A feature tree-based iterative learning load prediction method, characterized in that, Includes the following steps: Receive load characteristics, weather characteristics, and calendar characteristics; Feature selection is performed using the Sequential Forward Selection (SFS) algorithm to obtain a feature set. The SFS algorithm employs a feature tree selection algorithm for feature selection; the feature tree is an optimal feature generation tree, comprising: Number the features; Initialize the spanning tree, and use the empty feature with number 0 as the root node; Enumerate any new features that can be added and update the spanning tree; The optimal features are selected based on the generated tree; The spanning tree is updated and expanded based on the optimal features; Initialize the spanning tree, including: performing numerical initialization to satisfy... , , , ,in, Indicates features based on the spanning tree Representative feature set Expanding subsets For the original feature set, External features of the spanning tree The best rating score This indicates the optimal feature set selected by the model. for Evaluation score; Enumerating new features that can be added and updating the spanning tree includes: calculating ,when ,renew , ,in, This represents a newly added feature in the feature tree. express The corresponding features in the spanning tree For new features that can be added, To evaluate scores; The optimal feature is selected based on the spanning tree, satisfying the following: ,in, For an optimal feature, the following condition must be met: like If it does not exist, stop the calculation; like ,Will Add as parent node The child nodes, let , , ,in, yes In the parent node of the spanning tree, This indicates the set of features that have been selected to be added to the spanning tree; like , To features Expand a new tree chain and delete features. The original feature subtree, and let the atomic tree feature set be , , , ,when ,make , Recalculate ; The spanning tree is updated and expanded based on the optimal features, satisfying: when Then let , And continue to expand the spanning tree; otherwise, output the optimal selection feature set. ; The feature set is input into the XGBoost algorithm model for training; the feature selection and the training of the XGBoost algorithm model are iteratively learned using a multi-feature iterative learning framework; the feature selection and the training of the XGBoost algorithm model are iteratively learned using a multi-feature iterative learning framework, including the following steps: Input the feature set and its corresponding load forecast results; The optimal feature set is obtained by using the Sequential Forward Selection (SFS) algorithm for feature selection. The optimal feature set is substituted into the XGBoost learner for training to obtain the latest load prediction results; The model training process continues iteratively, updating the load prediction results and calculating the evaluation score. The iteration ends when the evaluation score of the next iteration is equal to or worse than the previous evaluation score, thus completing the model training. Training is complete, and the load power prediction model is obtained.
2. The iterative learning load prediction method based on feature trees as described in claim 1, characterized in that, The load characteristics include historical load power, the weather characteristics include weather type, temperature, and humidity, and the calendar characteristics include hour, weekday, month, and holidays.
3. The feature tree-based iterative learning load prediction method as described in claim 1 or 2, characterized in that, The feature selection includes internal feature selection and external feature selection. The load feature is an internal feature, and the weather feature and the calendar feature are external features.
4. The iterative learning load prediction method based on feature trees as described in claim 1, characterized in that, The evaluation score The calculation satisfies: , ,in, The number of training sample groups. Indicates the first Second verification Indicates training error. This represents the actual load value of the test set, while Indicates the first The test set predicts the load values in this validation. , It is the number of test load data samples.
5. A feature tree-based iterative learning load prediction device, characterized in that, It includes: The receiving module is used to receive load characteristics, weather characteristics, and calendar characteristics. The training module is used to perform feature selection using the Sequential Forward Selection (SFS) algorithm to obtain a feature set, wherein the SFS algorithm performs feature selection using a feature tree selection algorithm; the feature tree is an optimal feature generation tree, which includes: Number the features; Initialize the spanning tree, and use the empty feature with number 0 as the root node; Enumerate any new features that can be added and update the spanning tree; The optimal features are selected based on the generated tree; The spanning tree is updated and expanded based on the optimal features; Initialize the spanning tree, including: performing numerical initialization to satisfy... , , , ,in, Indicates features based on the spanning tree Representative feature set Expanding subsets For the original feature set, External features of the spanning tree The best rating score This indicates the optimal feature set selected by the model. for Evaluation score; Enumerating new features that can be added and updating the spanning tree includes: calculating ,when ,renew , ,in, This represents a newly added feature in the feature tree. express The corresponding features in the spanning tree For new features that can be added, To evaluate scores; The optimal feature is selected based on the spanning tree, satisfying the following: ,in, For an optimal feature, the following condition must be met: like If it does not exist, stop the calculation; like ,Will Add as parent node The child nodes, let , , ,in, yes In the parent node of the spanning tree, This indicates the set of features that have been selected to be added to the spanning tree; like , To features Expand a new tree chain and delete features. The original feature subtree, and let the atomic tree feature set be , , , ,when ,make , Recalculate ; The spanning tree is updated and expanded based on the optimal features, satisfying: when Then let , And continue to expand the spanning tree; otherwise, output the optimal selection feature set. The feature set is input into the XGBoost algorithm model for training; the feature selection and XGBoost algorithm model training are completed through iterative learning training using a multi-feature iterative learning framework to obtain the load power prediction model; the feature selection and XGBoost algorithm model training are completed through iterative learning using a multi-feature iterative learning framework, including the following steps: Input the feature set and its corresponding load forecast results; The optimal feature set is obtained by using the Sequential Forward Selection (SFS) algorithm for feature selection. The optimal feature set is substituted into the XGBoost learner for training to obtain the latest load prediction results; The model training process continues iteratively, updating the load prediction results and calculating the evaluation score. The iteration ends when the evaluation score of the next iteration is equal to or worse than the previous evaluation score, thus completing the model training.
6. An electronic device comprising a processor, a storage medium, and a computer program, wherein the computer program is stored in the storage medium, characterized in that, When the computer program is executed by the processor, it implements the feature tree-based iterative learning load prediction method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the feature tree-based iterative learning load prediction method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method for Predicting Benchmark Value of Unit Equipment Based on XGBoost Algorithm and System thereof
US20230213895A1
Means and methods for detecting bacteria in an aerosol sample
WO2010032245A2