An evaluation method and device for the load prediction results of a neural network based on SHAP values

By using the SHAP value evaluation method in the neural network load prediction model, the characteristic contribution degree is calculated and the attention mechanism is analyzed, the problem of low reliability caused by the "black box" of the neural network model is solved, and the prediction results are interpretable and reliable.

CN118964912BActive Publication Date: 2025-06-17STATE GRID JIANGSU ELECTRIC POWER CO ZHENJIANG POWER SUPPLY CO +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411008189.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2025-06-17
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

Due to its "black box" nature, the existing neural network model for power load prediction is difficult to explain the causes of the prediction results, resulting in low reliability of the prediction results in practical applications.

Method used

The neural network load prediction results evaluation method based on SHAP value is used to calculate the SHAP value of each feature contribution degree, analyze the characteristic influence of the model, analyze the main factors affecting the prediction results, and analyze the feature optimization configuration effect of the attention mechanism model.

Benefits of technology

Effectively evaluate the importance of neural network model characteristics, improve the interpretability of load prediction models, and at the same time improve the reliability of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964912B_ABST
    Figure CN118964912B_ABST
Patent Text Reader

Abstract

An evaluation method and device for the load prediction results of a neural network based on SHAP values. The method includes: extracting the load prediction data at each moment output by the neural network load prediction model integrating the attention mechanism; the extracted prediction data passes through the calculation module of the load influence feature contribution degree to obtain the load influence feature contribution degree; inputting the load influence feature contribution degree into the evaluation module for evaluation to obtain an evaluation result; the evaluation module includes a global evaluation module and a local evaluation module, the global evaluation module is used to evaluate the magnitude of the influence of each feature on the load and give the importance ranking of the influencing factors; the local evaluation module is used to dynamically evaluate the contribution degree of the input features and the contribution degree of the time series features at each moment, and further evaluate the reasons for the generation of the prediction results. The present invention can evaluate the prediction results of a model with the "black box" nature of the neural network, analyze the optimization effect of the attention mechanism on the load prediction model, and improve the reliability of the load prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the evaluation of neural network load prediction results, belonging to the field of artificial intelligence, and in particular to a method and device for evaluating neural network load prediction results based on SHAP values (Shapley Additive Explanation). Background Art

[0002] Today, with machine learning models becoming increasingly complex, the high-dimensional feature space and non-linear relationships of machine learning models make it impossible for engineers to accurately understand how the models make predictions or decisions based on input data. The models present an obvious "black box" structure, and it cannot be ensured that the prediction results are reliable in actual engineering applications.

[0003] Currently, due to the "black box" nature of the neural network model for power load prediction, it is difficult to explain the causes of prediction results, resulting in relatively low reliability of prediction results in actual applications. Since the relationship between influencing factors and electricity load has characteristics such as high complexity and high non-linearity, using the method of correlation analysis to measure the correlation between each influencing factor and the load in advance cannot truly reflect the complex non-linear influence of influencing factors on the load.

[0004] Therefore, while improving the accuracy of the load prediction model, it is of great significance to obtain the interpretability of its prediction results. Summary of the Invention

[0005] The object of the present invention is to address the above deficiencies and provide a method and device for evaluating neural network load prediction results based on SHAP values. A method for post-evaluation of the load prediction model is proposed. By calculating the SHAP values (Shapley Additive Explanation) of the contribution degrees of each feature, the influence degree of the features of the model is analyzed, the main factors affecting the prediction results are analyzed, and further, the feature optimization configuration effect of the attention mechanism model can be analyzed, solving the problem that the complex non-linear influence of influencing factors on the load cannot be truly reflected at present. While improving the accuracy of the load prediction model, the interpretability of its prediction results is obtained.

[0006] To achieve the above object, the present invention provides a method for evaluating neural network load prediction results based on SHAP values, and the method includes:

[0007] Extracting the load prediction data at each moment output by the neural network load prediction model integrating the attention mechanism;

[0008] The extracted prediction data passes through a calculation module of the contribution degree of load influence features to obtain the contribution degree of load influence features;

[0009] Inputting the contribution degree of load influence features into an evaluation module for evaluation to obtain an evaluation result;

[0010] The evaluation module includes a global evaluation module and a local evaluation module. The global evaluation module is used to evaluate the magnitude of the impact of each feature on the load and give the importance ranking of the influencing factors. The local evaluation module is used to dynamically evaluate the contribution degree of the input features and the contribution degree of the time series features at each moment, and further evaluate the reasons for the generation of the prediction results.

[0011] Furthermore, the calculation module for the contribution degree of the load impact features adopts a calculation method for the contribution degree of the load impact features based on SHAP values.

[0012] Furthermore, the evaluation method of the global evaluation module includes:

[0013] Calculate the average influence of each feature on the model prediction through the SHAP method, analyze the importance of each feature in the whole model, analyze the magnitude of the influence of each input feature on the non-air-conditioning load prediction result as a whole, and conduct importance ranking to evaluate the most critical features for the model's prediction result.

[0014] The calculation formula of the evaluation method of the global evaluation module is as follows:

[0015]

[0016] In the formula, is the SHAP value of feature i at time j; n is the total number of samples.

[0017] The larger the value of , the higher the degree of influence of feature i on the load prediction result as a whole; by comparing the sizes of different features , evaluate the magnitude of the impact of each feature on the load and give the importance ranking of the influencing factors.

[0018] Furthermore, the evaluation method of the local evaluation module is to calculate the influence of a certain time point in the neural network load prediction model; the influence is the influence of the features at this time point on the prediction result after the weights are assigned by the attention mechanism; and dynamically evaluate the reasons for the generation of the prediction result at this point.

[0019] Furthermore, the evaluation method of the local evaluation module includes:

[0020] Draw a heat map of the contribution degree of the input features according to the SHAP values of the input features, and display the high and low contribution degrees of each input feature to the load prediction results at each moment through the depth of the color, and dynamically evaluate the reasons for the change of the prediction results at each moment and the rationality of the prediction results;

[0021] Compare the changes in the weights of the input features at different times and the improvement effect of the attention mechanism on the prediction results, and dynamically evaluate the optimization configuration effect of the attention mechanism on the weights of the input features.

[0022] Adopt a calculation method for the contribution degree of load impact characteristics based on SHAP values to calculate the SHAP values of each historical moment's time series characteristics in the current moment of the load prediction model;

[0023] Draw a heat map of the contribution degree of time series characteristics, and show the high and low contribution degrees of the information contained in each historical moment to the current moment's prediction result through the depth of color, and dynamically evaluate the impact of the information at each historical moment on the current moment's load prediction result;

[0024] Compare the weight changes of historical information at different moments and the improvement effect of the attention mechanism on the prediction result, emphasize the information expression of key time steps, and dynamically evaluate the optimization configuration effect of the attention mechanism on the output weight of the time series hidden layer.

[0025] Furthermore, when drawing the heat map of the contribution degree of input characteristics, set the horizontal axis as the time point to be analyzed, set the vertical axis as each input characteristic, and distinguish the contribution degrees of each input characteristic at each moment calculated through different color blocks.

[0026] Furthermore, the changes in the weights of input characteristics at different moments include the ranking changes of the contribution degrees of each input characteristic under special weather and extreme temperature conditions and the prediction result accuracy at the corresponding moments.

[0027] Furthermore, when drawing the heat map of the contribution degree of time series characteristics, set the horizontal axis as the time point to be analyzed, set the vertical axis as the time series characteristics, and distinguish the contribution degrees of the time series characteristics at each moment calculated through different color blocks.

[0028] The present invention provides an evaluation device for the load prediction result of a neural network based on SHAP values, and the device includes:

[0029] A prediction data extraction module for extracting the load prediction data at each moment output by the neural network load prediction model integrating the attention mechanism;

[0030] A load impact characteristic contribution degree calculation module for calculating the load impact characteristic contribution degree, that is, the SHAP value of the input characteristic;

[0031] An evaluation module for evaluating the neural network prediction result after the prediction data extraction module.

[0032] Furthermore, the evaluation module includes:

[0033] A global evaluation module for evaluating the magnitude of the impact of each characteristic on the load and giving the importance ranking of the influencing factors;

[0034] A local evaluation module for dynamically evaluating the contribution degrees of the input characteristics and time series characteristics at each moment, and further evaluating the reasons for the generation of the prediction result.

[0035] This device achieves a balance between prediction performance and interpretability, improving the reliability of the model.

[0036] The present invention provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it realizes the above-mentioned evaluation of the neural network load prediction result based on SHAP values.

[0037] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the above-mentioned method for evaluating the neural network load prediction result based on SHAP values.

[0038] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0039] (1) An ex-post evaluation system for load prediction is established, providing an evaluation method for models with the "black box" nature of machine learning.

[0040] (2) A calculation method for the contribution degree of load impact characteristics combined with SHAP values is adopted to effectively evaluate the importance of neural network model features.

[0041] (3) A method for dynamically evaluating the contribution degree of input features and time series features is established to effectively evaluate the role of the feature optimization configuration of the attention mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The present invention will be further described below in conjunction with the drawings. The drawings are only for the purpose of showing the preferred embodiments and are not considered as a limitation to the present application.

[0043] Figure 1 It is a schematic flowchart of the prediction result evaluation method of the present invention.

[0044] Figure 2 It is a structural diagram of evaluating the load prediction result based on SHAP values used in the present invention.

[0045] Figure 3 It is a heat map of the result of evaluating the contribution degree of input features of the present invention.

[0046] Figure 4 It is a heat map of the result of evaluating the contribution degree of time series features of the present invention.

[0047] Figure 5 It is a structural schematic diagram of the device for evaluating the neural network load prediction result based on SHAP values of the present invention.

[0048] Figure 6 It is a structural schematic diagram of a computer device in some embodiments of the present application.

[0049] Figure 7Schematic diagram of the construction process of the evaluation model adopted by the method of the present invention. Specific embodiments

[0050] The embodiments of the technical solution of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present application more clearly, so they are only examples and cannot be used to limit the protection scope of the present application.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the term "including" and any variation thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion.

[0052] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, "a plurality" means two or more (including two), unless otherwise specifically defined.

[0053] Embodiment 1:

[0054] As Figure 1 shown, an evaluation method for the load prediction results of a neural network based on SHAP values includes the following steps:

[0055] Extract the load prediction data at each moment output by the neural network load prediction model with a fusion attention mechanism;

[0056] The extracted prediction data passes through the calculation module of the load influence feature contribution degree to obtain the load influence feature contribution degree, that is, the SHAP value of the input feature;

[0057] Input the load influence feature contribution degree into the evaluation module for evaluation and obtain an evaluation result;

[0058] The evaluation module includes a global evaluation module and a local evaluation module. The global evaluation module is used to evaluate the magnitude of the influence of each feature on the load and give the importance ranking of the influencing factors; the local evaluation module is used to dynamically evaluate the contribution degree of the input features and the contribution degree of the time series features at each moment, and then evaluate the reason for the generation of the prediction result.

[0059] Further, the evaluation method of the global evaluation module includes: calculating the average influence of each feature on the model prediction through the SHAP method, analyzing the importance of each feature in the whole model, analyzing the influence degree of each input feature on the non-air-conditioning load prediction result as a whole, and performing importance ranking to evaluate the features that are most critical to the model prediction result.

[0060] The calculation formula of the evaluation method of the global evaluation module is as follows:

[0061]

[0062] In the formula, is the SHAP value of feature i at time j; n is the total number of samples.

[0063] The larger the value of , the higher the influence degree of feature i on the load prediction result as a whole; by comparing the sizes of different features , the influence sizes of each feature on the load are evaluated, and the importance ranking of the influencing factors is given.

[0064] Further, the evaluation method of the local evaluation module is: through the influence of a certain time point in the neural network load prediction model, the influence is the influence of the features at this time point on the prediction result at this time point after the weights are assigned by the attention mechanism; and the reason for the prediction result at this time point is dynamically evaluated.

[0065] The evaluation method of the local evaluation module includes:

[0066] Adopting the input feature contribution degree dynamic change evaluation method to evaluate the change of the attention weights of the input features at each moment, specifically:

[0067] As Figure 3 shown, draw a heat map of feature contribution degrees according to the SHAP values of the input features, set the horizontal axis as the time points to be analyzed, set the vertical axis as each input feature, distinguish the contribution degrees of each input feature at each moment calculated by different color blocks, and display the contribution degrees of each input feature to the load prediction results at each moment through the depth of the color, dynamically evaluate the reasons for the change of the prediction results at each moment and the rationality of the prediction results;

[0068] From Figure 3 it can be seen that in the afternoon of high-temperature days, due to the increase in temperature and light, the contribution degree weights of the corresponding temperature and solar radiation features are significantly improved, while in the afternoon of rainy days, the contribution degree of the solar radiation feature significantly decreases, and the contribution degrees of the weather and humidity features increase. The contribution degree rankings and their amplitudes of each input feature have changed, proving that the attention mechanism adaptively configures the weights of the input features with the changes of weather, temperature, etc.

[0069] The evaluation method of the local evaluation module also includes using a dynamic change evaluation method for the contribution degree of historical moment time series features to evaluate the change of the output weight of the time series hidden layer at each moment. Specifically:

[0070] Use the calculation method of the contribution degree of load impact features based on SHAP values to calculate the SHAP values of each historical moment time series feature of the load prediction model at the current moment;

[0071] As Figure 4 shown, draw a heat map of the contribution degree of time series features, set the horizontal axis as the time points to be analyzed, set the vertical axis as the time series features, distinguish the contribution degree of each moment time series feature calculated by different color blocks, and show the contribution degree of the information contained in each historical moment to the prediction result at the current moment through the depth of color, and dynamically evaluate the impact of the information at each historical moment on the load prediction result at the current moment;

[0072] From Figure 4 it can be seen that when the time step is set to 8 for each sample, the t-1 moment with the highest time series attention weight is much higher than the current moment and other moments, improving the time series attention weight at the t-1 moment. Since the time window is short and the load power does not show periodicity, the time series attention weight at a farther moment is weakened.

[0073] Embodiment 2:

[0074] Referring to Figure 7 , the construction process of the evaluation model of the neural network load prediction result based on SHAP values adopted by the method of the present invention includes:

[0075] S1. Establish a test evaluation model. The model establishment process utilizes the input features of the neural network prediction model and the real-time weights of the hidden layer output values, and includes a module for evaluating the neural network prediction result afterwards;

[0076] S2. According to the SHAP value theory, form a calculation method for the contribution degree of load impact features based on SHAP values.

[0077] Further, step S1 is specifically: establish a post-evaluation model that first trains the load prediction model and then analyzes the correlation.

[0078] The load prediction model adopts an end-to-end structure, inputs climate and date influencing factors that affect the load power, and outputs the load power prediction value. The model uses the LSTM network for encoding and decoding respectively, calculates the contribution degree of the input feature attention mechanism to optimize the input features of the encoder LSTM network at the encoding end, and calculates the contribution degree of the time series attention mechanism to optimize the time series features of the decoder LSTM at the decoding end.

[0079] In the technical solution of the embodiment of the present application, the post-evaluation model is to add a post-explanation module after the network output layer of the neural network, and the post-explanation module is used to trace back the feature contribution of the prediction results at each time point, and evaluate the impact of the input features and time series features on the load forecast results. It can be seen that by tracing the causes of the load forecast results in this way, the prediction results of the neural network "black box" model can be effectively explained, and the prediction performance and explainability can be taken into account, thereby improving the reliability of the model.

[0080] In the technical solution of the embodiment of the present application, for the neural network load prediction model integrating the attention mechanism, such as Figure 2 As shown, the post-evaluation model is used to analyze the dynamic allocation of input feature weight configuration results at the input end of the neural network load forecasting model, and the output weight configuration results of the temporal hidden layer at its output end are analyzed; thereby achieving a balance between prediction performance and interpretability and improving model reliability.

[0081] Furthermore, step S2 is specifically as follows:

[0082] S2-1. Evaluate the influence of input features and historical moment information based on SHAP values;

[0083] SHAP value is a method in cooperative game theory to fairly distribute benefits to each member according to their contribution to the total benefit. Each influencing factor of the load is abstracted as a team member, and the result of load forecasting is taken as the total benefit. Then, the contribution of each influencing factor to the load forecasting result can be evaluated using SHAP value.

[0084] S2-2. Establish a calculation method for load impact characteristic contribution based on SHAP value;

[0085] The prediction result of any sample in the load forecasting model is expressed as the sum of the average prediction expectation of all samples and the SHAP value of all features of the sample. The calculation method is as follows:

[0086]

[0087] In the formula, G(x) represents the prediction result; β0 is the prediction benchmark value of the load forecasting model for all samples, which represents the expectation of the load forecasting model for the prediction result of any sample; M is the input feature dimension; β i is the SHAP value of the i-th dimension feature of the sample, indicating that any feature x of the sample x i The mean of the marginal contributions in different feature subsets, β i The calculation method is as follows:

[0088]

[0089] wherein, {x1, x2, …, x M} is the set of all features; S represents the feature subset that does not include feature i; F x (S) is the feature function, indicating the degree of influence of the influencing factors in S on the load prediction result through "collaboration". Its value can be calculated by the output of the influencing factors in S on the influencing factors not included in S in the load prediction model F, as shown in the following formula:

[0090]

[0091] where, is the input feature value at time j; n is the total number of samples.

[0092] The larger the absolute value of SHAP of a feature, the greater the contribution degree of the feature to the model prediction result. At the same time, the positive or negative nature of the SHAP value reflects whether the feature will increase or decrease the model output. Therefore, the SHAP value can accurately characterize the corresponding relationship between the prediction output when the feature value changes, and further explain the influence of key features on the non-air-conditioning load.

[0093] Embodiment 3:

[0094] The present invention provides an evaluation device for the load prediction result of a neural network based on the SHAP value, as Figure 5 shown. The device includes:

[0095] A prediction data extraction module, configured to extract the load prediction data at each moment output by the neural network load prediction model integrating the attention mechanism;

[0096] A load influence feature contribution degree calculation module, configured to obtain the load influence feature contribution degree through the load influence feature contribution degree calculation module for the obtained prediction data;

[0097] An evaluation module, configured to input the load influence feature contribution degree into the evaluation module for evaluation and obtain an evaluation result.

[0098] Further, the evaluation module includes:

[0099] A global evaluation module, configured to evaluate the magnitude of the influence of each feature on the load and give the importance ranking of the influencing factors;

[0100] A local evaluation module, configured to dynamically evaluate the contribution degree of the input features and the contribution degree of the time series features at each moment, and further evaluate the reason for the generation of the prediction result.

[0101] This evaluation module achieves a balance between prediction performance and interpretability, and improves the reliability of the model.

[0102] Optionally, in the evaluation device for the neural network load prediction result based on SHAP values provided in Embodiment 3, the calculation module for the contribution degree of load impact features represents the prediction result of any sample in the load prediction model as the average prediction expectation of all samples plus the sum of the SHAP values of all features of this sample. The calculation method is as follows:

[0103]

[0104] In the formula, G(x) represents the prediction result; β0 is the prediction benchmark value of the load prediction model for all samples, representing the expectation of the load prediction model for the prediction result of any sample; M is the input feature dimension; β i is the SHAP value of the i-th dimensional feature of the sample, indicating the average value of the marginal contribution of any feature x i of the sample x in different feature subsets. The calculation method of β i is shown in the following formula:

[0105]

[0106] In the formula, {x1, x2, …, x M} is the set of all features; S represents the feature subset that does not contain feature i; F x (S) is the feature function, indicating the degree of influence of the influencing factors in S on the load prediction result through "collaboration". Its value can be calculated by the output of the influencing factors in S on the influencing factors not included in S on the load prediction model F, as shown in the following formula:

[0107]

[0108] Among them, is the value of each input feature at time j; n is the total number of samples.

[0109] Optionally, in the evaluation device for the neural network load prediction result based on SHAP values provided in Embodiment 3, the global evaluation module calculates the average value of the SHAP values, and then calculates the average influence of each feature on the model prediction through the SHAP method, analyzes the importance of each feature in the entire model, analyzes the influence degree of each input feature on the non-air-conditioning load prediction result as a whole, and performs importance ranking to evaluate the features that are most critical to the prediction result of the model.

[0110] Optionally, in the evaluation device for the neural network load prediction result based on SHAP values provided in Embodiment 3, the local evaluation module evaluates the influence of a certain time point in the neural network load prediction model and dynamically evaluates the reason for the prediction result at this point.

[0111] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as those provided in Embodiment 1 in terms of the application scenarios and implementation processes, but are not limited to the solutions provided in Embodiment 1.

[0112] Embodiment 4:

[0113] According to an embodiment of the present invention, there is also provided a computer device, including a memory and a processor. As Figure 6 shown, the memory stores a computer program, and when the processor executes the computer program, it implements the technical solutions in the above embodiments of the method for evaluating the neural network load prediction results based on SHAP values of the present application or the above embodiments of the method for evaluating the neural network load prediction results based on SHAP values. The implementation principles and technical effects are similar and will not be elaborated here.

[0114] Embodiment 5:

[0115] According to an embodiment of the present invention, there is also provided a computer-readable storage medium corresponding to the method for evaluating the neural network load prediction results based on SHAP values. The storage medium includes a stored program, wherein when the program runs, it controls the device where the storage medium is located to execute the above-mentioned method for evaluating the neural network load prediction results based on SHAP values.

[0116] Since the processing and functions implemented by the storage medium in this embodiment are basically corresponding to the embodiments, principles, and examples of the foregoing method, for the parts not elaborated in the description of this embodiment, reference may be made to the relevant descriptions in the foregoing embodiments and will not be repeated here.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be covered within the scope of the claims and the description of the present application. In particular, as long as there is no structural conflict, the technical features mentioned in each embodiment can be combined in any way. The present application is not limited to the specific embodiments disclosed in the text, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for evaluating load forecasting results of a neural network based on SHAP values, characterized in that: The method includes: Extract the load forecast data at each moment output by the neural network load forecasting model integrating the attention mechanism; The extracted prediction data is passed through a load impact characteristic contribution calculation module to obtain a load impact characteristic contribution; Inputting the load impact characteristic contribution into an evaluation module for evaluation and obtaining an evaluation result; The evaluation module includes a global evaluation module and a local evaluation module. The global evaluation module is used to evaluate the impact of each feature on the load and give the importance ranking of the influencing factors; the local evaluation module is used to dynamically evaluate the contribution of the input features and the time series features at each moment, and then evaluate the reasons for the prediction results. The evaluation method of the local evaluation module is to dynamically evaluate the cause of the prediction result of a certain time point in the neural network load forecasting model through the influence of the time point; the influence is the influence of the characteristics of this time point on the prediction result of this time point after the weight is assigned by the attention mechanism; The evaluation method of the local evaluation module is as follows: Draw a heat map of input feature contribution based on the input feature SHAP value, and use the depth of color to show the contribution of each input feature to the load forecast result at each moment, and dynamically evaluate the cause of the change in the forecast result at each moment and the rationality of the forecast result; Compare the changes in input feature weights at different times and the improvement of the attention mechanism on the prediction results, and dynamically evaluate the optimization effect of the attention mechanism on the input feature weights; The SHAP value-based load impact characteristic contribution calculation method is used to calculate the SHAP value of the time series characteristics of each historical moment of the load forecasting model at the current moment; Draw a heat map of the contribution of time series characteristics, and use the depth of color to show the contribution of the information contained in each historical moment to the current moment's forecast results, and dynamically evaluate the impact of the information at each historical moment on the current moment's load forecast results; Compare the weight changes of historical information at different times and the improvement of the attention mechanism on the prediction results, emphasize the information expression of key time steps, and dynamically evaluate the optimization configuration effect of the attention mechanism on the output weights of the temporal hidden layer.

2. The evaluation method of the neural network load forecasting result based on SHAP value according to claim 1, characterized in that: The load impact feature contribution calculation module adopts a load impact feature contribution calculation method based on the SHAP value.

3. The evaluation method of the neural network load forecasting result based on SHAP value according to claim 1, characterized in that: The evaluation method of the global evaluation module comprises: The SHAP method is used to calculate the average influence of each feature on the model prediction, analyze the importance of each feature in the entire model, analyze the influence of each input feature on the non-air-conditioning load prediction results as a whole, and rank the importance to evaluate the most critical features for the model's prediction results; The calculation formula of the evaluation method of the global evaluation module is as follows: In the formula, is the SHAP value of feature i at time j; n is the total number of samples; The larger the value of, the higher the overall influence of feature i on the load forecast result. The size of each feature is evaluated to assess the impact of each feature on the load and to rank the importance of the influencing factors.

4. The evaluation method of the neural network load forecasting result based on SHAP value according to claim 1, characterized in that: When drawing a heat map of input feature contribution, set the horizontal axis to the time point to be analyzed, and the vertical axis to each input feature. Use different color blocks to distinguish the contribution of each input feature at each moment.

5. The evaluation method of the neural network load forecasting result based on SHAP value according to claim 1, characterized in that: The changes in the weights of input features at different times include the changes in the contribution ranking of each input feature under special weather and extreme temperature conditions and the accuracy of the prediction results at the corresponding time.

6. The evaluation method of the neural network load forecasting result based on SHAP value according to claim 1, characterized in that: When drawing a heat map of the contribution of time series features, set the horizontal axis to the time point to be analyzed, and the vertical axis to the time series feature. Use different color blocks to distinguish the contribution of the calculated time series features at each moment.

7. An evaluation device for a neural network load forecasting result based on a SHAP value, characterized in that: The device comprises: A prediction data extraction module is used to extract the load prediction data at each moment output by the neural network load prediction model integrating the attention mechanism; A load impact characteristic contribution calculation module is used to obtain the load impact characteristic contribution by passing the obtained prediction data through the load impact characteristic contribution calculation module; An evaluation module, used for inputting the load impact characteristic contribution into the evaluation module for evaluation and obtaining an evaluation result; The evaluation module includes a global evaluation module and a local evaluation module. The global evaluation module is used to evaluate the impact of each feature on the load and give the importance ranking of the influencing factors; the local evaluation module is used to dynamically evaluate the contribution of the input features and the time series features at each moment, and then evaluate the reasons for the prediction results. The evaluation method of the local evaluation module is to dynamically evaluate the cause of the prediction result of a certain time point in the neural network load forecasting model through the influence of the time point; the influence is the influence of the characteristics of the time point on the prediction result of the time point after the weight is assigned by the attention mechanism; The evaluation method of the local evaluation module is as follows: Draw a heat map of input feature contribution based on the SHAP value of the input feature, and use the depth of color to show the contribution of each input feature to the load forecast result at each moment, and dynamically evaluate the cause of the change of the forecast result at each moment and the rationality of the forecast result; Compare the changes in input feature weights at different times and the improvement of the attention mechanism on the prediction results, and dynamically evaluate the optimization effect of the attention mechanism on the input feature weights; The SHAP value-based load impact characteristic contribution calculation method is used to calculate the SHAP value of the time series characteristics of each historical moment of the load forecasting model at the current moment; Draw a heat map of the contribution of time series characteristics, and use the depth of color to show the contribution of the information contained in each historical moment to the current moment's forecast results, and dynamically evaluate the impact of the information at each historical moment on the current moment's load forecast results; Compare the weight changes of historical information at different times and the improvement of the attention mechanism on the prediction results, emphasize the information expression of key time steps, and dynamically evaluate the optimization configuration effect of the attention mechanism on the output weights of the temporal hidden layer.

8. The evaluation device for a neural network load forecasting result based on a SHAP value as claimed in claim 7, characterized in that: The calculation module of the load impact feature contribution expresses the prediction result of any sample in the load forecasting model as the sum of the average prediction expectation of all samples and the SHAP value of all features of the sample. The calculation method is as follows: In the formula, G(x) represents the prediction result; β0 is the prediction benchmark value of the load forecasting model for all samples, which represents the expectation of the load forecasting model for the prediction result of any sample; M is the input feature dimension; β i is the SHAP value of the i-th dimension feature of the sample, indicating that any feature x of the sample x i The mean of the marginal contributions in different feature subsets, β i The calculation method is as follows: In the formula, {x1,x2,…,x M } is the set of all features; S represents the feature subset that does not contain feature i; F x (S) is a characteristic function, which indicates the influence degree of the influencing factors in S on the load forecasting results through collaboration. Its value can be calculated by the output of the influencing factors in S to the influencing factors not included in S on the load forecasting model F, as shown in the following formula: in, are the input eigenvalues ​​at time j; n is the total number of samples.

9. The evaluation device for a neural network load forecasting result based on a SHAP value as claimed in claim 8, characterized in that: The global evaluation module calculates the average SHAP value of the input features; then the SHAP method is used to calculate the average influence of each feature on the model prediction, analyze the importance of each feature in the entire model, analyze the impact of each input feature on the non-air-conditioning load prediction results as a whole, and rank them by importance to evaluate the most critical features for the model's prediction results.

10. The evaluation device for a neural network load forecasting result based on a SHAP value according to claim 8, characterized in that: The local evaluation module dynamically evaluates the cause of the prediction result at a certain time point through the influence of the time point in the neural network load forecasting model; the influence is the influence of the characteristics of this time point on the prediction result at this time point after the weight is assigned by the attention mechanism.

11. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that the memory stores the computer program, and when the processor executes the computer program, the neural network load forecasting result evaluation method based on SHAP value described in any one of claims 1 to 6 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the neural network load forecasting result evaluation method based on SHAP value according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Comprehensive energy system load prediction method and device

    CN114997488A

  • Wind power interval prediction and interpretable method considering space-time correlation

    CN116937579A