A method for visualizing energy load forecasts
By combining classification and regression tree models with gradient boosting methods and time series decomposition algorithms, a GB-LT-CART model is constructed and visualized, solving the problem of poor model interpretability in existing technologies and realizing visualization and accuracy improvement in the energy load forecasting process.
Patent Information
- Application Number
- CN202111265626.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-10-28
AI Technical Summary
While existing energy load forecasting methods have improved forecast accuracy, the increased model complexity has led to reduced interpretability, making it impossible to fully visualize the forecasting process and thus making it difficult to explain the reasonableness of the results.
A combined model based on classification and regression tree model and gradient boosting (GBDT) is adopted, combined with time series decomposition algorithm to form GB-LT-CART model, and an energy load prediction model is constructed through ensemble learning method. The prediction path and results are displayed using visualization technology.
It enables a visual representation of the energy load forecasting process, improves forecast accuracy, enhances model interpretability, and makes forecast results more reliable.
Smart Images

Figure CN113988418B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of energy, and particularly relates to a visual method for energy load prediction. BACKGROUND
[0002] For the field of energy, load prediction is an important part of automation technology, and accurate prediction results can provide a basis for planning system supply and optimizing scheduling, effectively reduce energy loss, and improve operation safety and efficiency, so it is of great significance to establish a correct prediction model and improve prediction accuracy.
[0003] With the improvement of the accuracy of the existing prediction method, the complexity of the model is also improved, and the explainability is further reduced, so that the prediction method is in a black box state between input and output. The unknown of the prediction process by relevant personnel leads to that when the prediction result is questioned, the rationality of the result cannot be deduced, and finally the result of the model cannot be fully trusted. Therefore, the model has the ability to reasonably explain the prediction result, that is, the model has explainability, which is very important in the development process of artificial intelligence. Visualization is a form of explainability, which means that the prediction basis of the model is explained and described by view technology. The existing visualization technology of load prediction is focused on the visualization of the platform and part of the data, and the entire prediction process is not visually displayed.
[0004] The model establishment method of traditional energy load prediction generally adopts time series method, regression analysis method and expert system. With the rise of artificial intelligence technology, some researchers improve the prediction accuracy by using neural network, support vector machine and other complex model based methods; but the above-mentioned visualization technology of energy load prediction is focused on the visualization of the platform and part of the data, and the entire prediction process is not visually displayed. SUMMARY
[0005] In view of the deficiencies of the prior art, the purpose of the present application is to provide a visual method for energy load prediction, which is used for visual display of the process of energy load prediction.
[0006] The purpose of the present application can be realized by the following technical solutions:
[0007] A visual method for energy load prediction, comprising the following steps:
[0008] forming an energy load prediction model based on a classification and regression tree model and gradient boosting;
[0009] forming an energy load prediction model based on a classification and regression tree model and gradient boosting by inputting energy load historical data parameters and real-time parameters;
[0010] The prediction path and prediction result of the energy load prediction model based on the classification and regression tree model and gradient boosting are visualized.
[0011] Further, the energy load prediction model based on the classification and regression tree model and gradient boosting comprises: constructing an energy load prediction combination model between the energy load prediction model based on the classification and regression tree model and gradient boosting through the gradient boosting method in ensemble learning, to form the energy load prediction model based on the classification and regression tree model and gradient boosting.
[0012] Further, the energy load prediction model is constructed based on the classification and regression tree model.
[0013] Further, the energy load historical data is decomposed into trend components, seasonal components and residual components based on a time series decomposition algorithm, and the trend components, the seasonal components and the residual components are respectively input and parameters are set to form the energy load prediction model based on the classification and regression tree model and gradient boosting, and the trend components, the seasonal components and the residual components are respectively formed for prediction.
[0014] The prediction value output of the energy load prediction model based on the classification and regression tree model and gradient boosting is the superposition of the prediction values of the trend components, the seasonal components and the residual components.
[0015] The loss function of the energy load prediction model based on the classification and regression tree model and gradient boosting is the sum of the absolute values of the errors of the trend components, the seasonal components and the residual components.
[0016] Further, the display form of the visualization processing is a picture, and the prediction path is marked and displayed.
[0017] The beneficial effects of the present application are as follows:
[0018] The present application can visualize the process of energy load prediction. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those skilled in the art without creative labor.
[0020] Figure 1 It is a schematic diagram of the existing power energy load time series;
[0021] Figure 2 It is a comparison schematic diagram of the prediction effect improvement of the power energy load using the energy load prediction model after the implementation of the present application;
[0022] Figure 3This is a visual schematic diagram of a single model in the combined energy load forecasting model of this invention.
[0023] Figure 4 This is a visual schematic diagram of the entire model in the energy load forecasting combined model of this invention.
[0024] Figure 5 This is a visual diagram illustrating the prediction process of a single model in the combined energy load prediction model of this invention.
[0025] Figure 6 This is a visual diagram illustrating the entire prediction process in the combined energy load prediction model of this invention.
[0026] Figure 7 This is a flowchart of the prediction method in an example of the present invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] For ease of description, the energy source in this invention will be referred to as electrical energy in the following description, but this should not be taken as a reason to limit the invention.
[0029] like Figure 7 As shown, a visualization method for energy load forecasting includes the following steps:
[0030] To establish an energy load forecasting model, decision trees are a machine learning method with good visualization performance. When forecasting continuous data, the corresponding model is a classification and regression tree. This model is built based on the CART classification and regression tree model. Depending on the actual needs, relevant parameters are set, such as a maximum tree depth of 6 and a minimum number of samples per leaf node of 10. Historical data is used as the training set input, and the load forecasting model can be obtained through existing calculations.
[0031] However, individual models are prone to overfitting, resulting in insufficient generalization ability. Ensemble learning can be used to obtain a combined model composed of multiple classification and regression tree models. Existing ensemble learning methods are mainly divided into Bagging, Boosting, and Stacking, which combine multiple models to obtain a final model with better prediction performance.
[0032] Gradient Boosting is a method of Boosting, which combines multiple weak prediction models through gradient boosting to form a good prediction model. The key is to use the error of the previous round of model prediction as the target value of the next round of model learning. This method can significantly improve the final prediction accuracy and is more suitable for continuous load data.
[0033] The classification and regression tree model is combined with the gradient boosting method to form an energy load prediction model based on the classification and regression tree model and gradient boosting (GBDT). Historical data is used as the training set to be input into GBDT, and then relevant parameters are set, such as setting the maximum depth of the tree to 3, the minimum sample size of the leaf node to 10, the iteration number to 100, and the learning rate to 0.2, etc. Initial parameters, so that the load prediction model composed of multiple classification and regression trees can be obtained by calculation. This combined model can prevent overfitting while improving prediction accuracy and retaining good visualization performance of the model.
[0034] ①If historical data is used as the training set, it is input into the GBDT model and then relevant parameters are set, such as setting the maximum depth of the tree to 3, the minimum sample size of the leaf node to 10, the iteration number to 100, and the learning rate to 0.2, etc. Initial parameters, so that the load prediction model composed of multiple classification and regression trees can be obtained by calculation, and the optimization process is as follows: In the first iteration of the GBDT model, the historical load data is used as the target value, the maximum depth of the tree is 3, the minimum sample size of the leaf node is 10, the feature value for node splitting is first calculated, then each region is recursively divided into two sub-regions, and the predicted value is given as the mean value of the target value at the leaf node. Finally, a binary decision tree is generated; in the second iteration of GBDT, the error between the target value and the predicted value at the end of the first iteration is used as the target value for the second iteration, the feature value for node splitting is first calculated, then each region is recursively divided into two sub-regions, and the predicted value is given as the mean value of the target value of the second iteration at the leaf node. In this way, the load prediction model composed of multiple classification and regression trees can be obtained after the iteration is completed. When the features of the predicted data are input into the above model, the predicted values of each classification and regression tree are superimposed to obtain the final load prediction value.
[0035] However, due to the limitations of this prediction algorithm, it cannot well handle the trend of load time series with periodic fluctuations and trends. The reason is that the classification and regression tree model is based on historical mean value prediction model, so for load time series with time series growth trend, there is a defect that the predicted value may be a constant and cannot be extrapolated, which leads to the final GBDT unable to fit the implicit growth trend when predicting, and the output value lags behind the actual load value that increases with time, such as Figure 2 GBDT prediction value in the middle.
[0036] Therefore, the present application improves the trend fitting of load time series, decomposes the load time series by STL to obtain the trend component, seasonal component and residual component, and then improves the leaf node prediction method and loss function calculation method of CART, and proposes an improved CART for load time series (LT-CART). The leaf node is output by the constant prediction value, and the loss function is changed from the sum of error squares to the sum of absolute values of three components. At the same time, the historical sample data divided into the leaf node is saved. Then, the gradient boosting method is applied to the LT-CART model to obtain a prediction model GB-LT-CART that meets the accuracy requirement and has visualization performance. Through experiments, the prediction value of the improved model is closer to the real load value, such as Figure 2 the GB-LT-CART prediction value in the middle.
[0037] ②If the historical data is used as the training set, it is brought into the GB-LT-CART model, and then the related parameters are set, such as setting the tree depth to 3, the minimum sample number of the leaf node to 10, the iteration number to 100, and the learning rate to 0.2, etc. Initial parameters, a load prediction model composed of multiple classification and regression trees can be obtained by calculation, and the calculation process is as follows: the GB-LT-CART model generates the LT-CART model with each component of the historical load data as the target value in the first iteration, the maximum depth of the tree is 3, the minimum sample number of the leaf node is 10, and the prediction value of the leaf node is the prediction value of multiple components. At this time, since the trend component prediction is increased, the output value can well retain the trend; the second iteration of GB-LT-CART is performed, the negative gradient of the error absolute value is the sign function, so the error between the target value and the prediction value is used to calculate the sign function value, and the sign function value is used as the target value of the second iteration to generate the LT-CART model, and the prediction value of the leaf node is the prediction value of multiple components; in this way, after the iteration is completed, a load prediction model composed of multiple LT-CARTs is obtained. When the features of the to-be-predicted data are input into the above model, the sum of the values of each LT-CART predicting three components is the final load prediction value.
[0038] The improved algorithm uses a tree model structure, which offers good visualization performance by selecting different paths through branches. The entire tree model can be displayed as an image. When historical data and parameters are substituted into the proposed load forecasting model, a static forecasting model composed of multiple LT-CART models is obtained through calculation; this is the model before the input of forecast data. First, the individual LT-CART models within this forecasting model are output as images. Figure 3 For example, this figure shows the static LT-CART model without input data to be predicted. Circular nodes represent the features compared during prediction, and rectangular leaf nodes represent the predicted values and the sample data on which they are based. Then, the entire GB-LT-CART model is output as an image. Figure 4 For example, this figure shows a static GB-LT-CART model without any input data to be predicted, which visually displays all prediction paths and related data for the entire model. When predicting load, the characteristics of the load data to be predicted are input, and the prediction paths are marked and displayed, such as... Figure 5 The text is bolded, and then the entire GB-LT-CART predicted path is visualized, as shown below. Figure 6 The bolding effect is now complete, marking the second step of the invention. Of course, in other embodiments, the predicted path can be marked using color or other distinctive icons, as long as it is recognizable by the user.
[0039] The process of creating the visualization is as follows: During each iteration of the tree model calculation, the data for generating split nodes and leaf nodes are recorded. Split nodes are represented by circles, and their underlying feature values are stored. Then, the predicted data are displayed in rectangular form, and the paths predicted based on different features are connected with arrows, ultimately forming a tree model in image form. A single tree model is shown below. Figure 3 First, the X1 value of the split node for feature 1 is calculated and then drawn as a circle. All sample data are divided into two regions: values less than X1 are assigned to the left subtree, and values greater than or equal to X1 are assigned to the right subtree. Taking the left subtree as an example, the X2 value of the split point for feature 2 is calculated, and the subtree is divided into two regions based on feature 2. Predicted values are calculated based on the sample data of each region, and the sample data and predicted values are stored in leaf nodes, drawn as rectangles. The calculation paths are connected by arrows. The rest are processed in the same way to form a tree structure view. Figure 3 The model generated in each iteration is plotted, ultimately resulting in a predictive model view composed of multiple tree models. Figure 4 ).
[0040] The programming visualizes the prediction process and outputs the prediction process text: divided into two parts, first, the prediction path is displayed on the picture, and then the corresponding prediction process text is output: in order to represent the prediction path of data from input to output, the flow direction of data in the model is highlighted; the output prediction process text supplements the picture. For example, the output text when predicting (take Figure 5 as an example):
[0041] In the LT-CART prediction model of this iteration:
[0042] (1) The value of feature 1 is greater than X1, and the data flows from node a to node c;
[0043] (2) The value of feature 3 is less than X3, and the data flows from node c to node d;
[0044] (3) The value of feature 4 is greater than X4, and the data flows from node d to the right leaf node for prediction. According to the trend component, seasonal component and residual component of the historical sample data, the trend component of the current data is predicted to be 6170, the seasonal component is 1629, and the residual component is 3.2. The final predicted load value is 7802.2.
[0045] In the description of the present specification, the description of the terms "one embodiment", "example", "specific example" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0046] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above embodiments, and the above embodiments and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application.
Claims
1. A method of visualizing energy load forecasts, characterized by, The method comprises the following steps: forming an energy load prediction model based on a classification and regression tree model and gradient boosting; inputting historical data parameters and real-time parameters of the energy load to form the energy load prediction model based on the classification and regression tree model and gradient boosting; visualizing the prediction path and the prediction result of the energy load prediction model based on the classification and regression tree model and gradient boosting; decomposing the historical data of the energy load based on a time sequence to form a trend component, a seasonal component and a residual component, and inputting the trend component, the seasonal component and the residual component to the energy load prediction model based on the classification and regression tree model and gradient boosting to form the trend component, the seasonal component and the residual component for prediction respectively; the prediction value output of the energy load prediction model based on the classification and regression tree model and gradient boosting is the superposition of the prediction values of the trend component, the seasonal component and the residual component; the loss function of the energy load prediction model based on the classification and regression tree model and gradient boosting is the sum of the absolute values of the errors of the trend component, the seasonal component and the residual component. 2.The method of Claim 1, wherein, The forming of the energy load prediction model based on the classification and regression tree model and gradient boosting comprises: constructing an energy load prediction combination model through a gradient boosting method in ensemble learning between the energy load prediction models based on the classification and regression tree model and gradient boosting to form the energy load prediction model based on the classification and regression tree model and gradient boosting.
3. The method of visualizing energy load forecasts of claim 2, wherein, The energy load prediction model is constructed based on the classification and regression tree model. 4.The method of Claim 1, wherein, The visualized display form is a picture, and the prediction path is marked and displayed.
Citation Information
Patent Citations
Interpretation method and device for privacy tree model
CN111401570A