Continuous multi-day wind power prediction method for serial-parallel integrated learning
Through the serial-parallel integrated learning method, combined with XGBoost and PSO algorithm optimization, and using Bagging strategy to predict wind power, the accuracy and reliability problems of wind power power prediction are solved, the stability and cost reduction of the power system are achieved, and the power system is improved, and the power system is promoted. Development of renewable energy.
Patent Information
- Application Number
- CN202411085797.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-27
AI Technical Summary
The existing wind power power prediction methods cannot effectively solve the accuracy and reliability of wind power power prediction, resulting in unstable operation of the power system and high cost.
Using string-parallel ensemble learning, the feature contribution scoring mechanism of the XGBoost model is combined with manual experience, combined with PSO algorithm to optimize hyperparameters, and the Bagging strategy is used to train the integrated model of random sampling and tree, and the mean voting strategy is combined to predict. result.
It has achieved accurate prediction of wind power for many consecutive days, improved the operating efficiency and stability of the power system, reduced the cost of electricity, promoted the development of renewable energy and reduced carbon emissions.
Smart Images

Figure CN119204285A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of wind power prediction, and in particular to a method for predicting wind power for multiple consecutive days using series-parallel integrated learning. Background Art
[0002] As the shortage of traditional energy sources such as oil becomes increasingly prominent, the development of renewable energy has become a global consensus. As a new type of renewable energy, wind power generation has become one of the most mature technologies in the world. However, there are uncertainties and intermittent problems in wind power generation, which poses great challenges to the safe and stable operation of the power system. Actual projects have shown that accurate prediction of wind power can effectively meet this challenge.
[0003] Wind power forecasting is of great significance to the operation and planning of power systems, mainly as follows:
[0004] 1. Optimize grid dispatch: Wind power forecasting can help grid managers more accurately predict the future power output of wind turbines, thereby better dispatching other power generation resources in the power system, such as coal and natural gas, to meet the changing power demand.
[0005] 2. Improve grid stability: Wind power is an unstable energy source, and its power output is affected by meteorological factors such as wind speed and wind direction. By predicting wind power, grid managers can take timely measures to deal with wind power fluctuations, thereby improving the stability and reliability of the grid.
[0006] 3. Reduce electricity costs: Wind power forecasting can help power companies better plan the use of power generation resources and avoid over-reliance on traditional coal-fired power generation methods, thereby reducing electricity production costs and improving energy efficiency.
[0007] 4. Promote the development of renewable energy: The continuous improvement and application of wind power forecasting technology can improve the predictability and reliability of wind power, thereby increasing investors' confidence in wind power projects and promoting the development and utilization of renewable energy.
[0008] 5. Reduce carbon emissions: Wind power is a clean energy that can effectively reduce carbon emissions from the power system. By optimizing wind power forecasts, wind power resources can be better integrated, reducing dependence on traditional fossil fuels and further reducing carbon emissions.
[0009] Existing wind power prediction methods include:
[0010] 1). Reference 1: Yang Zimin, Peng Xiaosheng, Lang Jianxun, et al. Short-term power forecasting of wind power cluster based on cluster dynamic partitioning and BLSTM deep learning [J]. High Voltage Technology, 2021, 47(4): 1195-1203. This paper classifies the previous wind power data and then realizes the prediction of wind power through LSTM deep learning method.
[0011] 2). Chinese patent: A wind power prediction method based on transfer learning combined with deep learning (application number: 202111026927.9). The invention first extracts historical samples of newly built wind farms and surrounding wind farms through the SCADA system and numerical weather forecast, uses a small number of historical samples of newly built wind farms to train BP-NN, and then predicts a large number of historical samples of surrounding wind farms, and calculates the correlation coefficient of each historical sample of surrounding wind farms according to the prediction results; according to the correlation coefficient, a large number of historical samples of surrounding wind farms are divided into strong correlation samples, medium correlation samples and weak correlation samples; three model migration methods, namely sequential migration, reverse migration and disordered migration, are used to construct a prediction model for newly built wind farms and give prediction results respectively; finally, the B-LSTM network is used to integrate the three prediction results and output the final prediction result. However, this method does not decompose a large number of historical samples of surrounding wind farms, but only divides them into strong, medium and weak correlation samples according to the SCADA system, resulting in a large difference between the prediction results and the actual values.
[0012] 3). Literature 2: Shi Jiarong, Zhao Danmeng, Wang Linhua, et al. Short-term wind power forecasting based on RR-VMD-LSTM [J]. Power System Protection and Control, 2021, 49(21): 63-70. This method first uses RR to process the missing values and outliers of the collected data. VMD is then used to obtain the wind power sequence to eliminate noise and mine the main features of the original sequence. Finally, LSTM is used to learn and predict the historical time series of each decomposed sequence, and the final result of wind power is obtained by reconstructing the predicted values of all sequences. However, this model relies on subjective experience to adjust the number of network layers and neurons of the LSTM neural network, which makes it impossible to guarantee the prediction accuracy of the model.
[0013] In summary, there is currently no effective method for wind power prediction. Summary of the invention
[0014] In order to solve the above technical problems, the present invention provides a method for predicting wind power for multiple consecutive days based on series-parallel integrated learning, which can realize accurate prediction of wind power for multiple consecutive days. It is of great significance for improving the operating efficiency, stability and reliability of the power system, reducing electricity costs, promoting the development of renewable energy, and reducing carbon emissions.
[0015] The technical solution adopted by the present invention is:
[0016] A method for predicting continuous multi-day wind power by series-parallel integrated learning, comprising the following steps:
[0017] Step 1: Based on the feature contribution scoring mechanism of the XGBoost model and combined with manual experience, input features such as load history data, calendar rules, and weather information are screened;
[0018] Step 2: Through PSO algorithm optimization, cross-validation of training set and validation set is performed to obtain the optimal hyperparameter set of XGBoost model;
[0019] Step 3: Input the initial training sample, and randomly sample the initial training sample with replacement based on the Bagging strategy to obtain each sub-sample set;
[0020] Step 4: Using the tree ensemble model as the base learner, train the corresponding XGBoost model for each sub-sample set obtained by sampling;
[0021] Step 5: For the wind power prediction results of each XGBoost model for multiple consecutive days, the prediction results of each sub-model are combined using the mean voting strategy.
[0022] In step 1, it is known that in the data set D = {(x i ,y i )}(|D|=n,x i ∈R m ,y i ∈R), D represents the training data set; x i represents the feature vector of the i-th data point; y i represents the true value of the target; n represents the number of samples; R m represents the real number set of the mth feature; R represents the real number set.
[0023] The tree integration model formula is expressed as:
[0024]
[0025] In the formula, represents the true value of the target; k represents the number of trees; f k (x i ) represents the tree of the feature vector of the i-th data point; f k Represents the collection space of trees;
[0026] F={f(x)=w q(x)}(q:R m →T,w∈R T ) is the tree collection space; f(x) represents a regression tree w q(x)Each tree represented by R corresponds to an independent tree structure q and leaf weight w; T The real number corresponding to the number of leaves on the tree; x i is the feature vector of the i-th data point; q is the index of the leaf corresponding to the sample mapped to the structure of each tree; T is the number of leaves on the tree;
[0027] The tree loss function consists of two parts:
[0028]
[0029] Where Obj represents the loss function of the tree; Represents the predicted value and the target true value y i The training error between k ) represents the sum of the complexity of each tree, which is used to control the regularization term of the complexity of the tree ensemble model, namely:
[0030]
[0031] Where Ω(f) represents the sum of the complexities of each tree; γ is used to control the number of leaf nodes; λ ensures that the score of leaf nodes is not too large; W represents the score of leaf nodes.
[0032] Considering that the loss function in the first part cannot be optimized using traditional methods such as Euclidean distance and stochastic gradient descent, in general, an incremental training method is used for training. That is, each time a new function, i.e. a new tree, is added to the tree integration model while retaining the original tree integration model.
[0033] The serial ensemble learning mechanism based on XGBoost is as follows:
[0034]
[0035] In the formula, represents the model prediction value of the i-th sample in round 0; represents the model prediction value of the i-th sample in the first round; represents the model prediction value of the i-th sample in the second round; is the model prediction value of the i-th sample in the t-th round; Keep the model prediction value of round t-1 Then, add a new function f t (x i ); f1(xi) represents the function value of the first input sample; f2(x i ) represents the function value of the second input sample; f t (x i) represents the function value of the input t-th sample. The incremental function added in each round makes the objective function as much as possible. Minimize as much as possible.
[0036] In step 1, the feature contribution scoring mechanism is combined with human experience, specifically: XGBoost provides a method for scoring feature importance, which can measure the contribution of each feature to the final model prediction results. These scores can be calculated using internal metrics such as gain or coverage, reflecting the relative importance of the feature in the model. Human experience can play a role in interpreting these importance scores.
[0037] In step 2, the optimal hyperparameter set of the XGBoost model specifically refers to the maximum tree depth, learning rate, penalty coefficient, minimum loss value for node splitting, minimum weight of leaf nodes, random sampling ratio, etc. In order to obtain the optimal hyperparameters of the XGBoost model, the present invention uses the PSO algorithm to optimize and obtain the optimal hyperparameter set of the XGBoost model.
[0038] In the PSO algorithm, the hyperparameter set of XGBoost is defined as the fitness of PSO. During the iteration process of PSO, each particle trains the hyperparameter model of XGBoost into a set of random solutions to obtain the fitness value, including the following steps:
[0039] (1) Initialize the XGBoost hyperparameter set:
[0040] In the N-dimensional search space, m particle swarms constitute the initial particle swarm, and the position of the i-th particle in the search space is described as:
[0041]
[0042] Where: X i represents the position of the i-th particle; are the position of particle i in the 1st iteration, the position of particle i in the 2nd iteration, ... the position of particle i in the Nth iteration; m represents the number of particles.
[0043] (2) The processed feature data is randomly divided into a training set and a validation set according to a certain ratio.
[0044] (3) Determine the number of particles N in the population and the maximum number of iterations M.
[0045] (4) According to the position of each particle and speed range Initialize the particle's position and velocity.
[0046] (5) By calculating the fitness value of each particle, search for the particle with the maximum fitness in the historical iteration and the global best particle
[0047] (6) Update the velocity and position of each particle using the following formula.
[0048]
[0049] Where: represents the velocity of particle i in the nth iteration; represents the optimal position currently searched by the i-th particle in the n-th iteration; Indicates the optimal position currently searched by the entire particle swarm g in the nth iteration; represents the position of particle i in the nth iteration; w represents the inertia weight; c1 and c2 are acceleration constants, r1 and r2 are random numbers varying in the range [0,1], and α is the velocity constraint factor.
[0050] In step 2, in order to obtain the optimal hyperparameters of the XGBoost model, the present invention uses the PSO algorithm to optimize and obtain the optimal hyperparameter set of the XGBoost model. In the PSO algorithm, the hyperparameter set of XGBoost is defined as the fitness of PSO, and each particle trains the hyperparameter model of XGBoost into a set of random solutions to obtain the fitness value, and the optimal hyperparameters of the XGBoost model are obtained by updating the speed and position of each particle.
[0051] In step 3, bagging can be divided into two processes: self-service sampling and voting combination. Bagging generates random samples by sampling through self-service sampling (i.e. Bootstrap). The specific steps are as follows:
[0052] Assume that there are m samples in a data set, and randomly sample 1 sample with replacement each time, repeat m times, and get a new data set containing m samples. The random sampling operation with replacement makes it possible for each sample to be selected, and there may be repeated samples in the new data set. Therefore, after n rounds of self-service sampling, n sample sub-data sets are obtained, each of which contains m samples. Then, n prediction models are trained based on these n data sets to obtain each sub-sample set; finally, the n prediction models are combined through voting strategy (i.e., Aggregation). The parallel ensemble learning mechanism based on Bagging is as follows: Figure 3 As shown, the sub-sample set prediction generates a sub-model; in the sub-model, a new sub-sample set is randomly generated in the data set.
[0053] In step 4, the XGBoost model is essentially a tree-based Boosting serial ensemble learning algorithm, and the tree ensemble is formed by continuous serial superposition of base learners. In the process of multiple iterations, the model obtained by the current iteration will be adjusted according to the result of the previous iteration, and the deviation will be gradually reduced in a way that minimizes the loss function in sequence. However, due to the adoption of this serialized and adaptive optimization strategy, there is a strong correlation between the sub-models. The serial ensemble learning method cannot significantly reduce the variance and overfitting risk of the prediction model.
[0054] Different from the serial ensemble training method of the XGBoost model, the Boosting serial ensemble learning algorithm randomly samples from the original training data with replacement, trains each base learner separately and calculates the average value. Although the input of each base learner follows the same data distribution, the input data extracted each time are independent of each other. This Boosting serial ensemble learning algorithm effectively reduces the variance, avoids the overfitting effect of the model, and thus improves the generalization of the model. The relevant mechanisms of the serial and parallel ensemble algorithms are shown in Table 1.
[0055] Table 1 Analysis of the mechanism of serial and parallel integrated learning methods
[0056]
[0057] In step 4, training the corresponding XGBoost model includes the following steps:
[0058] Step 1: Input the training sample set D and the number of iterations t;
[0059] Step 2: Define the loss function;
[0060]
[0061] Where Obj represents the loss function; Represents the predicted value and the target true value y i The training error between k ) represents the sum of the complexity of the model;
[0062] Step 3: Calculate the first-order derivative and the second-order derivative;
[0063] Step 4: Add a tree and update the loss function;
[0064] Step 5: Determine whether the iteration requirements are met. If so, the model training ends.
[0065] In step 5, for the load prediction results of each XGBoost model, the prediction results of each XGBoost sub-model are combined using the mean voting strategy according to the following formula.
[0066]
[0067] In the formula, is the combination of prediction results of each sub-model, f i (x) is the prediction result of each sub-model; n represents the number of sub-models.
[0068] The mean voting strategy is an ensemble learning method that is usually used to integrate the prediction results of multiple basic prediction models in classification or regression problems. The basic idea is to take the average of the prediction results of multiple models as the final ensemble prediction result. In a classification task, if multiple classifiers predict a sample, the mean voting strategy averages the predicted probability or class label of each classifier for each class. Finally, the class with the highest average predicted probability or label is selected as the overall prediction result.
[0069] The present invention provides a method for predicting wind power for multiple consecutive days by using serial-parallel integrated learning, and the technical effects are as follows:
[0070] 1) The XGBoost proposed in step 1 of the present invention is an optimization of the Boosting algorithm, which integrates weak classifiers into a strong classifier. The XGBoost algorithm generates a new tree to fit the residual of the previous tree through continuous iteration. As the number of iterations increases, the accuracy continues to improve. Therefore, the XGBoost algorithm can better fit multi-day wind power data, thereby reducing the prediction error and achieving higher prediction accuracy;
[0071] 2) The PSO algorithm in step 2 of the present invention is a swarm intelligence optimization algorithm, and its core principle is to simulate the group cooperation behavior exhibited by birds when foraging. In the initialization stage of the PSO algorithm, a group of particles will be randomly generated, which represent potential solutions to a given problem. In order to prompt the entire population to gradually tend to the position with the best fitness, the particles influence each other through information exchange. The particle swarm optimization algorithm uses the fitness function value as the judgment criterion. Each particle has its own position and speed, representing a possible solution to a given problem. The individual optimal solution of the particle and the global optimal solution are updated in each iteration. In each iteration, the particles will search and move in space in order to track the current optimal particle to obtain the corresponding two fitness values. Compared with other optimization algorithms, the PSO algorithm has the advantages of strong global search capability, no need for gradient information, simple parameter adjustment, and suitability for parallel processing;
[0072] 3) In step 3 of the present invention, the Bagging parallel ensemble learning method randomly samples with replacement from the original training data, trains each base learner separately and calculates the average value. Although the input of each base learner obeys the same data distribution, the input data extracted each time are independent of each other. This Bagging parallel ensemble method effectively reduces the variance, avoids the overfitting effect of the model, and thus improves the generalization of the model;
[0073] 4) Step 4 of the present invention takes into account the difference in sensitivity to bias and variance between the serial ensemble learning algorithm and the parallel ensemble learning algorithm. The two ensemble learning methods are effectively combined to give full play to the advantages of the two models, which helps to obtain a more stable model with stronger generalization ability;
[0074] 5) The mean voting strategy proposed in step 5 of the present invention is a simple and effective ensemble learning method, which can usually reduce the error caused by a single model and improve the stability and accuracy of the overall prediction.
[0075] 6) The method of the present invention can realize accurate prediction of wind power for multiple consecutive days, which is of great significance for improving the operating efficiency, stability and reliability of the power system, reducing electricity costs, promoting the development of renewable energy and reducing carbon emissions. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0077] Figure 1 The figure is a flow chart of the method of the present invention.
[0078] Figure 2 Schematic diagram of the serial ensemble learning mechanism based on XGBoost.
[0079] Figure 3 Schematic diagram of the parallel ensemble learning mechanism based on Bagging.
[0080] Figure 4 It is the relationship curve between wind power and time obtained by the single model method and the present invention. DETAILED DESCRIPTION
[0081] A method for continuous multi-day wind power forecasting based on serial-parallel ensemble learning is proposed. This method first introduces the decomposition of the generalization error of statistical learning algorithms, explains the training mechanism of the XGBoost serial ensemble algorithm and the Bagging parallel ensemble learning, and analyzes the basic principle of the particle swarm algorithm. On the basis of comprehensive consideration of model deviation and variance distribution, a wind power forecasting model based on the XGBoost algorithm under the Bagging framework is proposed, and the particle swarm algorithm is used to cross-validate the optimal hyperparameters of the XGBoost model. Finally, for the continuous multi-day wind power forecasting results of each XGBoost model, the mean voting strategy is used to combine the forecast results of each sub-model. Compared with the traditional model, the Bagging-XGBoost algorithm with the base learner as the tree model has higher prediction accuracy. The prediction results show that the ensemble learning method coupled with the serial-parallel mode has a high application value in the continuous multi-day wind power forecasting scenario.
[0082] like Figure 1 As shown, a method for predicting continuous multi-day wind power by serial-parallel integrated learning is used to accurately predict continuous multi-day wind power, specifically including the following steps:
[0083] Step 1: The feature contribution scoring mechanism based on the XGBoost model is combined with manual experience to screen the input features.
[0084] In the known data set D = {(x i ,y i )}(|D|=n,x i ∈R m ,y i ∈R), the tree integration model formula is expressed as:
[0085]
[0086] Where, F = {f(x) = w q(x)}(q:R m →T,w∈R T ) is the set space of trees; x i is the feature vector of the i-th data point; q is the index of the leaf corresponding to the sample mapped to the structure of each tree; T is the number of leaves on the tree, and each tree f k Corresponding to an independent tree structure q and leaf weight w.
[0087] Its loss function consists of two parts:
[0088]
[0089] The first part is the predicted value and the target true value y iThe second part is the sum of the complexity of each tree, which is used to control the regularization term of the model complexity, that is,
[0090]
[0091] Considering that the objective function of the ensemble tree model in the loss function in the first part cannot be optimized using traditional methods such as Euclidean distance and stochastic gradient descent, in general, incremental training is used, that is, each time a new function (i.e. a new tree) is added to the model while retaining the original model. Figure 2 shown.
[0092]
[0093] Where: is the model prediction value of the i-th sample in the t-th round, Keep the model prediction value of round t-1 Then, add a new function f t (x i ). The incremental function added in each round tries to minimize the objective function as much as possible.
[0094] Step 2: Through PSO algorithm optimization, cross-validate the training set and validation set to obtain the optimal hyperparameter set of the XGBoost algorithm.
[0095] In the N-dimensional search space of the PSO algorithm, m particle swarms constitute the initial particle swarm, and the position of the i-th particle in the search space is described as:
[0096]
[0097] Each particle position is a potential solution, and the operation on particles includes the following two steps:
[0098]
[0099] The optimal trajectory of a single particle is denoted by That is, the individual extreme value, the optimal trajectory of the particle swarm is recorded as That is the global extreme value, and the particle moving speed is recorded as w represents the inertia weight, c1c2 is the acceleration constant, r1r2 is a random number in the range of [0,1], and α is the speed constraint factor.
[0100] Step 3: Input the initial training sample, and randomly sample the initial sample with replacement based on the Bagging strategy to obtain each sub-sample set.
[0101] Bagging can be divided into two processes: self-service sampling and voting combination. Its algorithm architecture is as follows: Figure 3 As shown in the figure. Bagging generates random samples by sampling through self-service sampling (i.e. Bootstrap). Assuming there are m samples in the data set, 1 sample is randomly sampled with replacement each time, and repeated m times to obtain a new data set containing m samples. The random sampling operation with replacement makes it possible for each sample to be selected, and there may be repeated samples in the new data set. Therefore, after n rounds of self-service sampling, n sample sub-data sets are obtained, each of which contains m samples. Then, n prediction models are trained based on these n data sets, and finally the n prediction models are combined (i.e. Aggregation) through voting combination strategy.
[0102] Step 4: Using the tree model as the base learner, train the corresponding XGBoost model for each sampling subsample set.
[0103] XGBoost is essentially a tree-based Boosting serial ensemble learning algorithm. Its ensemble method is formed by the continuous serial superposition of base learners. In the process of multiple iterations, the model obtained by the current iteration will be adjusted according to the results of the previous iteration, and the deviation will be gradually reduced in a way that the loss function is minimized in sequence. However, due to the adoption of this serialized and adaptive optimization strategy, there is a strong correlation between the sub-models. The serial ensemble learning method cannot significantly reduce the variance and overfitting risk of the prediction model. Unlike the XGBoost serial ensemble training method, the Bagging parallel ensemble learning method randomly samples with replacement from the original training data, trains each base learner separately, and calculates the average value. Although the input of each base learner follows the same data distribution, the input data extracted each time are independent of each other. This Bagging parallel collection method effectively reduces the variance, avoids the overfitting effect of the model, and thus improves the generalization of the model.
[0104] Step 5: For the wind power prediction results of each XGBoost model for multiple consecutive days, the prediction results of each sub-model are combined using the mean voting strategy.
[0105] For the continuous multi-day wind power prediction results of each XGBoost model, the prediction results of each sub-model are combined using the mean voting strategy according to the following formula.
[0106]
[0107] In the formula, is the combination of prediction results of each sub-model, f i (x) is the prediction result of each sub-model.
[0108] Finally, the output of each sub-model prediction result combination This is the wind power forecast result for multiple consecutive days.
[0109] In order to better illustrate the advantages of the method proposed in the present invention, the single model method and the method proposed in the present invention are used to predict the wind power for the same consecutive days, and the relationship curves between wind power and time corresponding to the two methods are plotted. The single model method refers to a method that uses a single algorithm or model to make predictions or analyses in machine learning or statistical modeling. Corresponding to the method of integrating multiple models in ensemble learning, the single model only relies on the model generated by a single training process to make predictions or decisions.
[0110] Figure 4 The curves of wind power and time obtained by the single model method and the present invention are compared. Figure 4 It can be seen from the single model method in the above and the method of the present invention that, at the same time, the wind power prediction of the method proposed in the present invention is more accurate than that of the single model method. Therefore, the method proposed in the present invention can achieve accurate and rapid prediction of wind power data for consecutive days, and can be better used in practical projects for stable and reliable operation of power systems.
Claims
1. A method for predicting continuous multi-day wind power by series-parallel integrated learning, characterized in that The following steps are involved: Step 1: Based on the feature contribution scoring mechanism of the XGBoost model and manual experience, the input features are screened; Step 2: Through PSO algorithm optimization, cross-validation of training set and validation set is performed to obtain the optimal hyperparameter set of XGBoost model; Step 3: Input the initial training sample, and randomly sample the initial training sample with replacement based on the Bagging strategy to obtain each sub-sample set; Step 4: Using the tree ensemble model as the base learner, train the corresponding XGBoost model for the sampled sub-sample sets respectively; Step 5: For the continuous multi-day wind power prediction results of each XGBoost model, the mean voting strategy is used to combine the prediction results of each sub-model.
2. The method for predicting continuous multi-day wind power by series-parallel integrated learning according to claim 1, characterized in that: In step 1, it is known that in the data set D = {(x i ,y i )}(|D|=n,x i ∈R m ,y i ∈R), D represents the training data set; x i represents the feature vector of the i-th data point; y i represents the true value of the target; n represents the number of samples; R m represents the real number set of the mth feature; R represents the real number set; The tree integration model formula is expressed as: In the formula, represents the true value of the target; k represents the number of trees; f k (x i ) represents the tree of the feature vector of the i-th data point; f k Represents the set space of trees; F = {f(x) = w q(x) }(q:R m →T,w∈R T ) is the tree collection space; f(x) represents a regression tree w q(x) Each tree represented by R corresponds to an independent tree structure q and leaf weight w; T The real number corresponding to the number of leaves on the tree; x i is the feature vector of the i-th data point; q is the index of the leaf corresponding to the sample mapped to the structure of each tree; T is the number of leaves on the tree; The tree loss function consists of two parts: Where Obj represents the loss function of the tree; Represents the predicted value and the target true value y i The training error between k ) represents the sum of the complexity of each tree, which is used to control the regularization term of the complexity of the tree ensemble model, namely: In the formula, Ω(f) represents the sum of the complexity of each tree; γ is used to control the number of leaf nodes; λ ensures that the score of leaf nodes is not too large; W represents the score of leaf nodes; The incremental training method is used for training, that is, each time a new function, i.e. a new tree, is added to the tree integration model while retaining the original tree integration model.
3. The method for predicting continuous multi-day wind power by serial-parallel integrated learning according to claim 2 is characterized by: The serial ensemble learning mechanism based on XGBoost is as follows: In the formula, represents the model prediction value of the i-th sample in round 0; represents the model prediction value of the i-th sample in the first round; represents the model prediction value of the i-th sample in the second round; is the model prediction value of the i-th sample in the t-th round; Keep the model prediction value of round t-1 Then, add a new function f t (x i ); f1(xi) represents the function value of the first input sample; f2(x i ) represents the function value of the second input sample; f t (x i ) represents the function value of the input t-th sample. The incremental function added in each round makes the objective function as much as possible. Minimize as much as possible.
4. The method for predicting continuous multi-day wind power by series-parallel integrated learning according to claim 1, characterized in that: In step 2, the PSO algorithm is used to optimize the optimal hyperparameter set of the XGBoost model: In the PSO algorithm, the hyperparameter set of XGBoost is defined as the fitness of PSO. During the iteration process of PSO, each particle trains the hyperparameter model of XGBoost into a set of random solutions to obtain the fitness value, including the following steps: (1) Initialize the XGBoost hyperparameter set: In the N-dimensional search space, m particle swarms constitute the initial particle swarm, and the position of the i-th particle in the search space is described as: Where: X i represents the position of the i-th particle; are the position of particle i in the 1st iteration, the position of particle i in the 2nd iteration, and so on. m represents the number of particles. (2) Randomly divide the processed feature data into training set and validation set according to a certain ratio; (3) Determine the number of particles N in the population and the maximum number of iterations M; (4). According to the position of each particle and speed range Initialize the particle's position and velocity; (5) By calculating the fitness value of each particle, search for the particle with the maximum fitness in the historical iteration and the global best particle (6) Update the velocity and position of each particle using the following formula; Where: represents the velocity of particle i in the nth iteration; represents the optimal position currently searched by the i-th particle in the n-th iteration; Indicates the optimal position currently searched by the entire particle swarm g in the nth iteration; represents the position of particle i in the nth iteration; w represents the inertia weight; c1 and c2 are acceleration constants, r1 and r2 are random numbers varying in the range [0,1], and α is the velocity constraint factor.
5. The method for predicting continuous multi-day wind power by series-parallel integrated learning according to claim 1, characterized in that: In step 3, bagging is divided into two processes: self-service sampling and voting combination. Bagging generates random samples by self-service sampling. The specific steps are as follows: Suppose there are m samples in the data set, and 1 sample is randomly sampled with replacement each time, and this is repeated m times to obtain a new data set containing m samples. The random sampling operation with replacement makes it possible for each sample to be selected, and there may be repeated samples in the new data set. Therefore, after n rounds of bootstrap sampling, n sample sub-data sets are obtained, each of which contains m samples. Then, n prediction models are trained based on these n data sets to obtain sub-sample sets.
6. The method for predicting continuous multi-day wind power by series-parallel integrated learning according to claim 1, characterized in that: In step 4, the XGBoost model is a tree-based Boosting serial ensemble learning algorithm, which randomly samples with replacement from the original training data, trains each base learner separately and calculates the average value.
7. The method for predicting continuous multi-day wind power by serial-parallel integrated learning according to claim 6, characterized in that: In step 4, training the corresponding XGBoost model includes the following steps: Step 1: Input the training sample set D and the number of iterations t; Step 2: Define the loss function; Where, Obj represents the loss function; Represents the predicted value and the target true value y i The training error between k ) represents the sum of the complexity of the model; Step 3: Calculate the first-order derivative and the second-order derivative; Step 4: Add a tree and update the loss function; Step 5: Determine whether the iteration requirements are met. If so, the model training ends.
8. The method for predicting continuous multi-day wind power by series-parallel integrated learning according to claim 1, characterized in that: In step 5, for the load forecast results of each XGBoost model, the forecast results of each XGBoost sub-model are combined using the mean voting strategy according to the following formula: In the formula, is the combination of prediction results of each sub-model, f i (x) is the prediction result of each sub-model; n represents the number of sub-models.
Citation Information
Cited By
Wind and wave response modeling and ocean current inversion method based on machine learning
CN120562318A
