Natural gradient lifting-based interpretable photovoltaic power generation probability prediction method and system
By using natural gradient enhancement and LIME interpretation methods in photovoltaic power generation prediction technology, data characteristics are optimized, and the problems of insufficient prediction accuracy and lack of interpretation ability in the existing technology are solved, and high-precision and high-interpretationality photovoltaic power generation probability prediction is achieved.
Patent Information
- Application Number
- CN202411674938.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
The existing photovoltaic power generation prediction technology has problems such as insufficient prediction accuracy, lack of interpretation ability, complex model training and tuning, and difficulty in adapting to environmental changes.
The interpretable photovoltaic power generation probability prediction method based on natural gradient enhancement is adopted, combined with the NGBoost algorithm and LIME additive interpretation method, to optimize data characteristics and improve prediction accuracy and interpretability.
High-precision short-term photovoltaic power generation probability prediction is achieved, and the transparency and credibility of the model are enhanced through interpretive analysis, overcoming the limitations of traditional prediction technology.
Smart Images

Figure CN119623708A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation probability prediction, and in particular to an explainable photovoltaic power generation probability prediction method and system based on natural gradient boosting. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] With the transformation of the global energy structure and the advancement of sustainable development strategies, the power system is gradually shifting to a clean energy system without fossil fuels. In this process, renewable energy, especially photovoltaic (PV) power, has become an important alternative to traditional energy due to its clean and low-carbon characteristics. However, PV power generation has significant randomness and volatility, which is mainly affected by weather conditions such as cloud cover, temperature and humidity, which poses challenges to the stable operation of the power system and the efficient operation of the power market.
[0004] To meet this challenge, accurate power forecasting technology is particularly important. It can help power system operators optimize grid operation and reduce the demand for reserve capacity. It can also provide decision support for participants in the power market and reduce the risk of market transactions. Although the research and application of photovoltaic power generation forecasting technology have made certain progress, the existing technology still has some shortcomings: (1) Limited prediction accuracy. Traditional prediction models, such as physics-based models and early machine learning models, often have difficulty capturing the complex nonlinear relationship and real-time changing characteristics of photovoltaic power, resulting in insufficient prediction accuracy; (2) Lack of explanation ability. Many existing prediction models, especially complex machine learning models, are regarded as "black boxes". Although they can provide prediction results, they cannot provide explanations for the prediction results, which limits the application of models in environments that require transparency and trust; (3) Complex model training and tuning. Although some advanced machine learning models have high prediction accuracy, they require a lot of parameter adjustments and model tuning, which not only increases the complexity of model training, but also increases the requirements for professional knowledge and computing resources; (4) Difficult to adapt to environmental changes. With the change of climate patterns and the aging of photovoltaic equipment, existing prediction models may need to be frequently retrained and adjusted to adapt to new environmental conditions, which increases long-term operating costs. Summary of the invention
[0005] In order to address the shortcomings of the prior art, the present invention provides an interpretable photovoltaic power generation probability prediction method and system based on natural gradient boosting, which can not only provide high-precision prediction results, but also enhance the transparency and credibility of the model by explaining the prediction results. By combining the natural gradient boosting algorithm (NGBoost) and the LIME additive interpretation method, the limitations of traditional prediction technology are overcome, and high-precision prediction and high interpretability of short-term photovoltaic power generation probability are achieved.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides an explainable photovoltaic power generation probability prediction method based on natural gradient boosting.
[0008] A method for predicting the probability of photovoltaic power generation based on natural gradient boosting includes the following steps:
[0009] Obtain historical and current data characteristics of the photovoltaic power station;
[0010] The data features are used as input to a pre-trained natural gradient boosting model, and the natural gradient boosting model outputs a photovoltaic power generation probability prediction result within a future set time period;
[0011] Among them, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction.
[0012] As a further limitation of the first aspect of the present invention, the data characteristics include: temperature characteristics, relative humidity characteristics, precipitation characteristics, wind speed characteristics, ground solar radiation characteristics, month characteristics, time characteristics of a day and lagging power value characteristics.
[0013] As a further limitation of the first aspect of the present invention, the acquisition of the month feature includes: mapping the periodic month variable onto a unit circle, calculating the cosine feature and the sine feature for each month, the cosine feature includes: month_sin = sin(2π·month / 12), the sine feature includes: month_cos = cos(2π·month / 12), and the cosine feature and the sine feature are used as the month feature.
[0014] As a further limitation of the first aspect of the present invention, according to the autocorrelation of the power time series, three lagged power values are deployed 15 minutes, 30 minutes and 45 minutes before the required time step.
[0015] As a further limitation of the first aspect of the present invention, the optimization of data features input to the natural gradient boosting model using the LIME model includes:
[0016] Set the variance threshold σ for the natural gradient boosting model prediction * , construct a sample size of M train The training set and the sample size is M test The test set
[0017] Train the natural gradient boosting model using the training set M train Get the trained model At this time, the number of original data features is d, using and S Test Calculate the variance σ of each test sample test , judge all σ test Less than σ * The percentage of test %;
[0018] Use uniform sampling method to sample Samples are interpreted by LIME model. Get the new data feature quantity d′, d′ <d;
[0019] Using the new data features obtained, corresponding to the new input x′, repeat the natural gradient boosting model training and calculation to obtain the second σ test %, until σ test When %≥80%, the feature optimization process ends and the optimized data features are obtained.
[0020] As a further limitation of the first aspect of the present invention, g(z,θ a )∈G is defined as a proxy model, where G represents a class of potential interpretable models and θ a is the parameter vector of g(·), and z is the eigenvector of the input of g(·);
[0021] f NG (x) represents the original model of the natural gradient boosting model to be explained, where z i is the input of the surrogate model g(·), z i The components of f NG (x) The top d′ features with the greatest influence, the objective function that the LIME model needs to optimize is:
[0022] L(·) is the approximation between the proxy model and the original natural gradient boosting model, For the given i-th data feature xi The weights near here for This means that the larger the predicted variance, the smaller the weight given to the explainable fitting process. is the complexity of g(·), K is a constant, Represents the data features x at training stage t i The corresponding prediction variance;
[0023] M is the number of data features in the training set, f NG (x i ) represents the i-th data feature x i is the output result of the original model of the input natural gradient boosting model, g(z i ) is z i is the output of the proxy model g(·) for the input;
[0024] By minimizing the objective function, the proxy model approximates the original model, and the optimized coefficients Indicates the interpretability of the prediction results of the original model of the natural gradient boosting model.
[0025] As a further limitation of the first aspect of the present invention, the natural gradient boosting model comprises: a basic learning machine Parameter probability distribution P θ (y|x) and the scoring rule L NG (P θ ,y), n is the nth learner, N is the number of basic learners, x is the input variable, y is the target variable, and θ is the parameter vector;
[0026] Using shallow decision trees as base learners for natural gradient boosting models The specific form of P is selected as the normal distribution. θ The characteristic distribution of (y|x), the specific form of the evaluation function is: L NG (θ,y)=-log(P θ (y)), L NG (θ,y) As the scoring rule L NG (P θ ,y).
[0027] As a further limitation of the first aspect of the present invention, the training process of the natural gradient boosting model includes:
[0028] Suppose there is a training set Where: M represents the number of data features, and the first round parameter set includes:
[0029] For each base learner, calculate the corresponding natural gradient: t represents the training phase, i represents the i-th data feature, About L NG The Fisher information measure of represents the partial derivative calculation about θ, represents the i-th parameter vector of the t-1 training stage, y i represents the i-th target variable, represents the i-th natural gradient in the t training stage;
[0030] when After the calculation is completed, With input x i Let’s train the basic learner f for this stage t together (t) The scaling factor ρ(t) is obtained, because P θ (y|x) is a normal distribution. When the training is completed, the mean μ and variance σ of the normal distribution will be estimated. The trained natural gradient boosting model gives the probability distribution characteristics of the target value, and then the probabilistic prediction results can be obtained.
[0031] As a further limitation of the first aspect of the present invention, the calculation formula of ρ(t) is:
[0032] The parameters are updated by the following formula;
[0033] Among them, η represents the learning rate coefficient, ρ (t) represents the scaling factor of the training stage t, f (t) (x i ) represents the data feature x i The output result of the basic learner after the input training stage t.
[0034] As a further limitation of the first aspect of the present invention, the calculation formula of the Fisher information measure is:
[0035]
[0036] Where: Y is a set of data feature labels.
[0037] In a second aspect, the present invention provides an explainable photovoltaic power generation probability prediction system based on natural gradient boosting.
[0038] An interpretable photovoltaic power generation probability prediction system based on natural gradient boosting includes the following processes:
[0039] The data feature acquisition unit is configured to: acquire historical and current data features of the photovoltaic power station;
[0040] A power generation probability prediction unit is configured to: use the data features as input to a pre-trained natural gradient boosting model, and the natural gradient boosting model outputs a photovoltaic power generation probability prediction result within a future set time period;
[0041] Among them, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction.
[0042] As a further limitation of the second aspect of the present invention, in the data feature acquisition unit, the data features include: temperature features, relative humidity features, precipitation features, wind speed features, ground solar radiation features, month features, time of day features and lagged power value features.
[0043] As a further limitation of the second aspect of the present invention, the acquisition of the month feature includes: mapping the periodic month variable onto a unit circle, calculating the cosine feature and the sine feature for each month, the cosine feature includes: month_sin=sin(2π·month / 12), the sine feature includes: month_cos=cos(2π·month / 12), and the cosine feature and the sine feature are used as the month feature.
[0044] As a further limitation of the second aspect of the present invention, according to the autocorrelation of the power time series, three lagged power values are deployed 15 minutes, 30 minutes and 45 minutes before the required time step.
[0045] As a further limitation of the second aspect of the present invention, in the power generation probability prediction unit, the LIME model is used to optimize the data features of the natural gradient boosting model input, including:
[0046] Set the variance threshold σ for the natural gradient boosting model prediction * , construct a sample size of M train The training set and the sample size is M test The test set
[0047] Train the natural gradient boosting model using the training set M train Get the trained model At this time, the number of original data features is d, using and S Test Calculate the variance σ of each test sample test , judge all σtest Less than σ * The percentage of test %;
[0048] Use uniform sampling method to sample Samples are interpreted by LIME model. Get the new data feature quantity d′, d′ <d;
[0049] Using the new data features obtained, corresponding to the new input x′, repeat the natural gradient boosting model training and calculation to obtain the second σ test %, until σ test When %≥80%, the feature optimization process ends and the optimized data features are obtained.
[0050] As a further limitation of the second aspect of the present invention, in the power generation probability prediction unit, g(z,θ a )∈G is defined as a proxy model, where G represents a class of potential interpretable models and θ a is the parameter vector of g(·), and z is the eigenvector of the input of g(·);
[0051] f NG (x) represents the original model of the natural gradient boosting model to be explained, where z i is the input of the surrogate model g(·), z i The components of f NG (x) The top d′ features with the greatest influence, the objective function that the LIME model needs to optimize is:
[0052] L(·) is the approximation between the proxy model and the original natural gradient boosting model, For the given i-th data feature x i The weights near here for This means that the larger the predicted variance, the smaller the weight given to the explainable fitting process. is the complexity of g(·), K is a constant, Represents the data features x at training stage t i The corresponding prediction variance;
[0053] M is the number of data features in the training set, f NG (x i ) represents the i-th data feature x i is the output result of the original model of the input natural gradient boosting model, g(z i ) is z iis the output of the proxy model g(·) for the input;
[0054] By minimizing the objective function, the proxy model approximates the original model, and the optimized coefficients Indicates the interpretability of the prediction results of the original model of the natural gradient boosting model.
[0055] In a third aspect, the present invention provides a computer device, comprising: a processor and a computer-readable storage medium;
[0056] a processor adapted to execute a computer program;
[0057] A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the explainable photovoltaic power generation probability prediction method based on natural gradient boosting as described in the first aspect of the present invention is implemented.
[0058] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the interpretable photovoltaic power generation probability prediction method based on natural gradient boosting as described in the first aspect of the present invention.
[0059] In a fifth aspect, the present invention provides a computer program product, characterized in that the computer program product comprises a computer program, and when the computer program is executed by a processor, it implements the interpretable photovoltaic power generation probability prediction method based on natural gradient boosting as described in the first aspect of the present invention.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] 1. This paper innovatively proposes an interpretable photovoltaic power generation probability prediction method based on natural gradient boosting, which can not only provide high-precision prediction results, but also enhance the transparency and credibility of the model by explaining the prediction results. By combining the natural gradient boosting algorithm (NGBoost) and the LIME additive interpretation method, it overcomes the limitations of traditional prediction technology and achieves high-precision prediction and high interpretability of short-term photovoltaic power generation probability.
[0062] 2. In order to ensure that the model regards December and January as two consecutive months rather than two completely different characteristic values, the present invention maps the periodic month variable onto a unit circle, and for each month, its sine and cosine parts are calculated as monthly features, thereby improving the accuracy of data features.
[0063] 3. The present invention innovatively proposes an objective function of LIME that includes given data feature weights, and the data feature weights are inversely proportional to the predicted variance, that is, the larger the predicted variance, the smaller the weight given by the explainable fitting process, thereby improving the accuracy of the interpretability analysis.
[0064] 4. The present invention innovatively proposes an NGBoost feature optimization strategy based on interpretable analysis, uses uniform sampling technology, samples multiple samples for LIME model interpretation, and then optimizes data features, which greatly improves the accuracy of photovoltaic power generation probability prediction.
[0065] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0067] Figure 1 A schematic diagram of a flow chart of an explainable photovoltaic power generation probability prediction method based on natural gradient boosting provided in Example 1 of the present invention;
[0068] Figure 2 A schematic diagram of the NGBoost model provided in Example 1 of the present invention;
[0069] Figure 3 A schematic diagram of the NGBoost feature optimization method based on interpretable analysis provided in Example 1 of the present invention;
[0070] Figure 4 A schematic diagram of an explainable photovoltaic power generation probability prediction system based on natural gradient boosting provided in Example 2 of the present invention;
[0071] Figure 5 A schematic diagram of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0072] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0073] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0074] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0075] Embodiment 1:
[0076] This implementation proposes an interpretable photovoltaic power generation probability prediction method based on natural gradient boosting, which obtains the historical and current data features of the photovoltaic power station; uses the data features as the input of the pre-trained natural gradient boosting model, and the natural gradient boosting model outputs the photovoltaic power generation probability prediction results within the future set time period; wherein, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction. The following is a brief introduction to the technical terms and related concepts involved in this processing scheme, including:
[0077] LIME (Local Interpretable Model-Agnostic Explanations), or locally interpretable model-agnostic explanations, is a model interpretation method that aims to provide clear and explainable explanations for individual predictions of any machine learning model. LIME is based on a basic assumption: while the overall behavior of a complex AI model may be difficult to understand, individual predictions can be explained by observing the local behavior of the model around a specific prediction. It uses interpretable models (such as linear models, decision trees, etc.) to locally approximate the predictions of the target black box model. Specifically, LIME does not go deep into the model, but instead detects how the output of the black box model changes by slightly perturbing the input, and trains an interpretable model at the point of interest (original input) based on this change. This interpretable model is a local approximation of the black box model and can reflect the behavior of the model near the prediction being explained.
[0078] NGBoost combines the ideas of gradient boosting trees and natural gradient descent to improve prediction accuracy by predicting the distribution of the target variable, rather than just predicting a point estimate. This approach is particularly suitable for regression problems, but also supports classification problems. NGBoost updates the prediction parameters by iteratively minimizing the natural gradient of the scoring rule. The natural gradient plays a key role in this optimization process, which ensures the invariance of parameter updates to the parameterization method and makes the optimization process more stable. It has the following characteristics: High accuracy, NGBoost improves prediction accuracy by predicting the full probability distribution of the target variable, which has higher accuracy than methods that only predict point estimates; Modular design: NGBoost allows users to customize base learners, probability distributions, and scoring rules, providing high flexibility and scalability; Stability: The use of natural gradient descent makes the optimization process more stable and reduces oscillations and convergence time during training; Scikit-Learn compatibility: NGBoost follows the API specification of Scikit-Learn and can be easily integrated into existing data science workflows.
[0079] Specifically, this implementation includes the following processes:
[0080] Step 1: Data collection.
[0081] Step 1.1: Model input.
[0082] The historical and real-time data characteristics of the photovoltaic power station within a certain period of time are collected as the input data of the prediction model, with a time resolution of 15 minutes per feature.
[0083] In this implementation, the data features include: temperature features, relative humidity features, precipitation features, wind speed features, ground solar radiation features, month features, time features of a day and lagged power value features; among which: according to the autocorrelation of the power time series, three lagged power values are deployed 15 minutes, 30 minutes and 45 minutes before the required time step, which are represented as t-15, t-30 and t-45 respectively.
[0084] To ensure that the model considers December and January as two consecutive months rather than two completely different feature values, the periodic month variable is mapped to a unit circle (patent innovation), and its sine and cosine parts are calculated for each month as the month feature, which is specifically set as:
[0085] month_sin=sin(2π·month / 12) (1);
[0086] month_cos=cos(2π·month / 12) (2)
[0087] Note that since nighttime hours are removed from the dataset, time of day is no longer a periodic variable and does not require a similar transformation.
[0088] Step 1.2: Model output.
[0089] The model outputs PV power data for the next 36 hours (with a time resolution of 15 minutes) as the prediction result.
[0090] Step 2: Design of NGBoost model.
[0091] In this implementation, the natural gradient boosting algorithm (NGBoost) is used as the main model for photovoltaic power prediction. The algorithm can handle probabilistic regression problems and generate parameters for prediction distribution.
[0092] NGBoost is a gradient boosting algorithm for solving probabilistic regression problems. Typically, the gradient boosting algorithm is based on sequential training of multiple base learners, which together form an additive set. Each learner is optimized by iteratively minimizing the cumulative estimated residual of the previous learner. The output of the learner is then scaled by the learning rate and appended to the current additive set.
[0093] Generally, NGBoost has a good effect on the distribution P θ (y|x)(abbreviated as P θ or P θ (y)) are estimated, where: represents the D-dimensional real-valued input variables of the model, represents a 1-dimensional real-valued target variable, is the L-dimensional parameter vector of the distribution. NGBoost consists of three main modules: (1) Basic learner n represents the number of learners, (2) parameter probability distribution P θ (y|x), and (3) the scoring rule L NG (P θ ,y), the schematic diagram of NGBoost is as follows Figure 2 shown.
[0094] Specifically, a shallow decision tree is used as the base learner of the NGBoost model. (n) The specific form of the decision tree is: Where T is the number of leaves in the decision tree, and q is the structure of the decision tree, which maps the input to the leaf index w. The normal distribution is selected as the description of P θ The characteristic distribution of (y|x); finally, the specific form of the evaluation function is:
[0095] L NG(θ,y)=-log(P θ (y)) (3);
[0096] During training, NGBoost uses natural gradient That is, the scoring rule L NG (P θ ,y) in the parameterized probability distribution P θ and the gradient on y, it is the direction of steepest ascent, so moving the parameters by a very small amount in that direction of the gradient (relative to any other direction) will increase the scoring rule by the largest amount.
[0097] Step 21: Training process.
[0098] Suppose there is a training set Where: M represents the number of samples. The first round parameter set can be obtained by the following formula:
[0099]
[0100] Then, for each base learner f (t) , calculate the corresponding natural gradient:
[0101]
[0102] Here, t represents the training stage, i represents the i-th sample, About L NG The Fisher information measure of Represents the partial derivative calculation about θ.
[0103] The calculation formula of Fisher information measure is:
[0104]
[0105] Among them, Y is the set of sample labels.
[0106] when After the calculation is completed, it is combined with the input x i Let’s train the basic learner f for this stage t together (t) The scaling factor ρ(t) is obtained, and the calculation formula of ρ(t) is:
[0107]
[0108] at the same time, The parameters are updated by:
[0109]
[0110] Here, η represents the learning rate coefficient, which is an artificially set constant. θ(y|x) is a normal distribution. After the training is completed, we can get the estimates of the mean μ and variance σ of the normal distribution, which are and Therefore, the model gives the probability distribution characteristics of the target value Y, and then the probabilistic prediction results can be obtained.
[0111] Step 3: Interpretive analysis.
[0112] In this implementation, the LIME additive interpretation method is used to calculate the contribution of each feature to the prediction result. a )∈G is defined as a proxy model, where G represents a class of potential interpretable models and θ a is the parameter vector of g(.). Here, g(z,θ a ) can be set as:
[0113]
[0114] Among them, z j is a component of z with dimension d; θ aj is θ a Component, d∈D.
[0115] Represents the original NGBoost model to be explained. is the input of the proxy model g(.), z i The components of f NG (x) The top d′ features with the greatest influence. The objective function that LIME needs to optimize is defined as
[0116]
[0117] Where: L(.) is the approximation between the proxy model and the original NGBoost model, which is used here; For a given x i The weights near here for This means that the larger the predicted variance, the smaller the weight given to the explainable fitting process (patent innovation point). is the complexity of g(.), which can be regarded as a regularization term, and is set here as K is a constant.
[0118] The expression is:
[0119]
[0120] By minimizing formula (11), LIME achieves the approximation of the proxy model to the original model, and the optimized coefficients It indicates the degree of interpretability of the prediction results of the original model φ(.).
[0121] Step 5: NGBoost feature optimization based on interpretable analysis.
[0122] Set the variance threshold σ for NGBoost predictions * , construct a sample size of M train The training set and test set The specific process includes:
[0123] S1: Train the NGBoost model using the training set M train Get the trained model At this time, the original number of features is d; use and S Test Calculate the variance σ of each test sample test , judge all σ test Less than σ * The percentage of test %;
[0124] S2: Use uniform sampling technique to sample Samples are interpreted by LIME model. Get new d′, d′ <d;
[0125] S3: Use the new features obtained in step S2 to correspond to the new input x′, repeat step S1 to perform NGboost model training and calculation, and obtain the second σ test %, until σ test %>=80%, the feature optimization process ends, see Figure 3 .
[0126] Embodiment 2:
[0127] like Figure 4 As shown, this implementation provides an interpretable photovoltaic power generation probability prediction system based on natural gradient boosting, including the following processes:
[0128] The data feature acquisition unit is configured to: acquire historical and current data features of the photovoltaic power station;
[0129] A power generation probability prediction unit is configured to: use the data features as input to a pre-trained natural gradient boosting model, and the natural gradient boosting model outputs a photovoltaic power generation probability prediction result within a future set time period;
[0130] Among them, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction.
[0131] In this implementation, further, in the data feature acquisition unit, the data features include: temperature features, relative humidity features, precipitation features, wind speed features, ground solar radiation features, month features, time features of a day and lagged power value features.
[0132] In this implementation, further, the acquisition of the month feature includes: mapping the periodic month variable onto a unit circle, calculating the cosine feature and the sine feature for each month, the cosine feature includes: month_sin=sin(2π·month / 12), the sine feature includes: month_cos=cos(2π·month / 12), and the cosine feature and the sine feature are used as the month feature.
[0133] In this implementation, further, according to the autocorrelation of the power time series, three lagged power values are deployed 15 minutes, 30 minutes and 45 minutes before the required time step.
[0134] In this implementation, further, in the power generation probability prediction unit, the LIME model is used to optimize the data features of the natural gradient boosting model input, including:
[0135] Set the variance threshold σ for the natural gradient boosting model prediction * , construct a sample size of M train The training set and the sample size is M test The test set
[0136] Train the natural gradient boosting model using the training set M train Get the trained model At this time, the number of original data features is d, using and S Test Calculate the variance σ of each test sample test , judge all σ test Less than σ * The percentage of test %;
[0137] Use uniform sampling method to sample Samples are interpreted by LIME model. Get the new data feature quantity d′, d′ <d;
[0138] Using the new data features obtained, corresponding to the new input x′, repeat the natural gradient boosting model training and calculation to obtain the second σ test %, until σ test When %≥80%, the feature optimization process ends and the optimized data features are obtained.
[0139] In this implementation, further, in the power generation probability prediction unit, g(z,θ a )∈G is defined as a proxy model, where G represents a class of potential interpretable models and θ a is the parameter vector of g(·), and z is the eigenvector of the input of g(·);
[0140] f NG (x) represents the original model of the natural gradient boosting model to be explained, where z i is the input of the surrogate model g(·), z i The components of f NG (x) The top d′ features with the greatest influence, the objective function that the LIME model needs to optimize is:
[0141] L(·) is the approximation between the proxy model and the original natural gradient boosting model, For the given i-th data feature x i The weights near here for This means that the larger the predicted variance, the smaller the weight given to the explainable fitting process. is the complexity of g(·), K is a constant, Represents the data features x at training stage t i The corresponding prediction variance;
[0142] M is the number of data features in the training set, f NG (x i ) represents the i-th data feature x i is the output result of the original model of the input natural gradient boosting model, g(z i ) is z i is the output of the proxy model g(·) for the input;
[0143] By minimizing the objective function, the proxy model approximates the original model, and the optimized coefficients Indicates the interpretability of the prediction results of the original model of the natural gradient boosting model.
[0144] It is understandable that the above-mentioned various units can be separately or all combined into one or several other units to constitute, or some (some) units therein can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be realized by multiple units, or the function of multiple units can be realized by one unit. In other embodiments of the present application, the system can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0145] According to another embodiment of the present application, the system described in this embodiment can be constructed, and the method of Example 1 of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.
[0146] Embodiment 3:
[0147] like Figure 5 As shown, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.
[0148] Among them, the communication interface 1002 is used to receive and send data, the computer-readable storage medium 1003 can be stored in the memory of the electronic device, the computer-readable storage medium 1003 is used to store a computer program, the computer program includes program instructions, and the processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.
[0149] Processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.
[0150] The processor 1001 is configured to execute the following process:
[0151] Obtain historical and current data characteristics of the photovoltaic power station;
[0152] The data features are used as input to a pre-trained natural gradient boosting model, and the natural gradient boosting model outputs a photovoltaic power generation probability prediction result within a future set time period;
[0153] Among them, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction.
[0154] The detailed process is described in Example 1 and will not be repeated here.
[0155] Embodiment 4:
[0156] This implementation provides a computer-readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides a storage space that stores the processing system of the electronic device.
[0157] In addition, the storage space also stores one or more instructions suitable for being loaded and executed by the processor, and these instructions may be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here may be a high-speed RAM memory, or a non-volatile memory, such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located away from the aforementioned processor.
[0158] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process:
[0159] The detailed process is described in Example 1 and will not be repeated here.
[0160] Embodiment 5:
[0161] The present implementation provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the following process:
[0162] The detailed process is described in Example 1 and will not be repeated here.
[0163] A person skilled in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium or transmitted by a computer-readable storage medium. The computer instruction can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (for example, coaxial cable, optical fiber, digital line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server, a data center, etc. that contains one or more available media integration. Available media can be magnetic media (for example, floppy disk, hard disk, tape), optical media (for example, DVD), or semiconductor media (for example, solid-state drive (Solid State Disk, SSD)) and the like.
[0165] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An interpretable photovoltaic power generation probability prediction method based on natural gradient boosting, characterized in that: The process includes: Obtain historical and current data characteristics of the photovoltaic power station; The data features are used as input to a pre-trained natural gradient boosting model, and the natural gradient boosting model outputs a photovoltaic power generation probability prediction result within a future set time period; Among them, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction.
2. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 1, characterized in that: The data characteristics include: temperature characteristics, relative humidity characteristics, precipitation characteristics, wind speed characteristics, ground solar radiation characteristics, month characteristics, time characteristics of a day and hysteresis power value characteristics.
3. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 2, characterized in that: The acquisition of the month feature includes: mapping the periodic month variable onto a unit circle, calculating the cosine feature and the sine feature for each month, the cosine feature includes: month_sin=sin(2π·month / 12), the sine feature includes: month_cos=cos(2π·month / 12), and the cosine feature and the sine feature are used as the month feature.
4. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 2, characterized in that: According to the autocorrelation of the power time series, three lagged power values are deployed 15min, 30min, and 45min before the required time step.
5. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 1, characterized in that: The LIME model is used to optimize the data features of the natural gradient boosting model input, including: Set the variance threshold σ for the natural gradient boosting model prediction * , construct a sample size of M train The training set and the sample size is M test The test set Train the natural gradient boosting model, using the training set M train Get the trained model At this time, the number of original data features is d, using and S Test Calculate the variance σ of each test sample test , judge all σ test Less than σ * The percentage of test %; Use uniform sampling method to sample Samples are interpreted by LIME model. Get the new data feature quantity d′, d′ <d; Using the new data features obtained, corresponding to the new input x′, repeat the natural gradient boosting model training and calculation to obtain the second σ test %, until σ test When %≥80%, the feature optimization process ends and the optimized data features are obtained.
6. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to any one of claims 1 to 5, characterized in that: Let g(z,θ a )∈G is defined as a proxy model, where G represents a class of potential interpretable models and θ a is the parameter vector of g(·), and z is the eigenvector of the input of g(·); f NG (x) represents the original model of the natural gradient boosting model to be explained, where z i is the input of the surrogate model g(·), z i The components of f NG (x) The top d′ features with the greatest influence, the objective function that the LIME model needs to optimize is: L(·) is the approximation between the proxy model and the original natural gradient boosting model, For the given i-th data feature x i The weights near here for This means that the larger the predicted variance, the smaller the weight given to the explainable fitting process. is the complexity of g(·), K is a constant, Represents the data features x at training stage t i The corresponding prediction variance; M is the number of data features in the training set, f NG (x i ) represents the i-th data feature x i is the output result of the original model of the input natural gradient boosting model, g(z i ) is z i is the output of the proxy model g(·) for the input; By minimizing the objective function, the proxy model approximates the original model, and the optimized coefficients Indicates the interpretability of the prediction results of the original model of the natural gradient boosting model.
7. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to any one of claims 1 to 5, characterized in that: The natural gradient boosting model includes: a basic learner Parameter probability distribution P θ (y|x) and the scoring rule L NG (P θ ,y), n is the nth learner, N is the number of basic learners, x is the input variable, y is the target variable, and θ is the parameter vector; Using shallow decision trees as base learners for natural gradient boosting models The specific form of P is selected as the normal distribution. θ The characteristic distribution of (y|x), the specific form of the evaluation function is: L NG (θ,y)=-log(P θ (y)), L NG (θ,y) As the scoring rule L NG (P θ ,y).
8. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 7, characterized in that: The training process of the natural gradient boosting model includes: Suppose there is a training set Where: M represents the number of data features, and the first round parameter set includes: For each base learner, calculate the corresponding natural gradient: t represents the training phase, i represents the i-th data feature, About L NG The Fisher information measure of represents the partial derivative calculation about θ, represents the i-th parameter vector of the t-1 training stage, y i represents the i-th target variable, represents the i-th natural gradient in the t training stage; when After the calculation is completed, With input x i Let’s train the basic learner f for this stage t together (t) The scaling factor ρ(t) is obtained, because P θ (y|x) is a normal distribution. After training, we can get an estimate of the mean μ and variance σ of the normal distribution. The trained natural gradient boosting model gives the probability distribution characteristics of the target value, and then we can get a probabilistic prediction result.
9. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 8, characterized in that: The calculation formula of ρ(t) is: The parameters are updated by the following formula; Among them, η represents the learning rate coefficient, ρ (t) represents the scaling factor of the training stage t, f (t) (x i ) represents the data feature x i The output result of the basic learner after the input training stage t.
10. The explainable photovoltaic power generation probability prediction method based on natural gradient boosting according to claim 8, characterized in that: The calculation formula of Fisher information measure is: Where: Y is a set of data feature labels.
11. An explainable photovoltaic power generation probability prediction system based on natural gradient boosting, characterized in that: The process includes: The data feature acquisition unit is configured to: acquire historical and current data features of the photovoltaic power station; A power generation probability prediction unit is configured to: use the data features as input to a pre-trained natural gradient boosting model, and the natural gradient boosting model outputs a photovoltaic power generation probability prediction result within a future set time period; Among them, during the training process of the natural gradient boosting model, the LIME model is used to optimize the data features of the natural gradient boosting model input, and the optimized data features are used as the input of the natural gradient boosting model for photovoltaic power generation probability prediction.
12. The explainable photovoltaic power generation probability prediction system based on natural gradient boosting according to claim 11, characterized in that: In the data feature acquisition unit, the data features include: temperature features, relative humidity features, precipitation features, wind speed features, ground solar radiation features, month features, time features of a day and hysteresis power value features.
13. The explainable photovoltaic power generation probability prediction system based on natural gradient boosting according to claim 12, characterized in that: The acquisition of the month feature includes: mapping the periodic month variable onto a unit circle, calculating the cosine feature and the sine feature for each month, the cosine feature includes: month_sin=sin(2π·month / 12), the sine feature includes: month_cos=cos(2π·month / 12), and the cosine feature and the sine feature are used as the month feature.
14. The explainable photovoltaic power generation probability prediction system based on natural gradient boosting according to claim 12, characterized in that: According to the autocorrelation of the power time series, three lagged power values are deployed 15min, 30min, and 45min before the required time step.
15. The explainable photovoltaic power generation probability prediction system based on natural gradient boosting according to claim 11, characterized in that: In the power generation probability prediction unit, the LIME model is used to optimize the data features of the natural gradient boosting model input, including: Set the variance threshold σ for the natural gradient boosting model prediction * , construct a sample size of M train The training set and the sample size is M test The test set Train the natural gradient boosting model, using the training set M train Get the trained model At this time, the number of original data features is d, using and S Test Calculate the variance σ of each test sample test , judge all σ test Less than σ * The percentage of test %; Use uniform sampling method to sample Samples are interpreted by LIME model. Get the new data feature quantity d′, d′ <d; Using the new data features obtained, corresponding to the new input x′, repeat the natural gradient boosting model training and calculation to obtain the second σ test %, until σ test When %≥80%, the feature optimization process ends and the optimized data features are obtained.
16. The explainable photovoltaic power generation probability prediction system based on natural gradient boosting according to claims 11-15, characterized in that: In the power generation probability prediction unit, g(z,θ a )∈G is defined as a proxy model, where G represents a class of potential interpretable models and θ a is the parameter vector of g(·), and z is the eigenvector of the input of g(·); f NG (x) represents the original model of the natural gradient boosting model to be explained, where z i is the input of the surrogate model g(·), z i The components of f NG (x) The top d′ features with the greatest influence, the objective function that the LIME model needs to optimize is: L(·) is the approximation between the proxy model and the original natural gradient boosting model, For the given i-th data feature x i The weight near, here c xi for This means that the larger the predicted variance, the smaller the weight given to the explainable fitting process. θ is the complexity of g(·). K is a constant, Represents the data features x at training stage t i The corresponding prediction variance; M is the number of data features in the training set, f NG (x i ) represents the i-th data feature x i is the output result of the original model of the input natural gradient boosting model, g(z i ) is z i is the output of the proxy model g(·) for the input; By minimizing the objective function, the proxy model approximates the original model, and the optimized coefficients Indicates the interpretability of the prediction results of the original model of the natural gradient boosting model.
17. A computer device, characterized in that: include: A processor and a computer readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method for predicting the probability of photovoltaic power generation based on natural gradient boosting according to any one of claims 1 to 10 is implemented.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the interpretable photovoltaic power generation probability prediction method based on natural gradient boosting as described in any one of claims 1 to 10.
19. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the explainable photovoltaic power generation probability prediction method based on natural gradient boosting as described in any one of claims 1 to 10.