Method for constructing interpretable hydrological time series prediction model
By integrating deep learning technology and SHAP interpretable methods in the hydrological time series prediction model, the interpretability problem of deep neural networks in the hydrological forecasting field is solved, the credibility and certainty of the model are improved, and efficient for related applications are provided , accurate data support.
Patent Information
- Application Number
- CN202411577805.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-18
AI Technical Summary
The application of deep neural networks in the field of hydrological forecasting is due to its highly nonlinear complex structure, which makes it difficult for users to understand the model working mode and predict results, and lacks interpretability, which limits its use in sensitive or high-risk areas.
Deep learning technology is used to integrate different models into strengths and weaknesses, and optimize them. Combined with the interpretable method SHAP, it is used in the hydrological time series prediction model, to explore the internal structure of the deep learning model and interpret and analyze the model results to enhance the certainty and ability of the model Confidence.
It improves the interpretability and credibility of the hydrological time series prediction model, enhances the certainty of the model, and provides efficient and accurate data and knowledge support for applications such as flood control and drought relief, water conservancy engineering planning and design, water resource management and development.
Smart Images

Figure CN119476608A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent prediction and interpretable machine learning technology, and in particular to a method for constructing an interpretable hydrological time series prediction model. Background Art
[0002] Flood disasters have always been one of the most important natural disasters threatening human survival and social development. my country is located in the East Asian monsoon region, where summer rainstorms are frequent and widely distributed, forming regional rainstorms such as pre-flood season rainstorms in South China, plum rain season rainstorms in Jianghuai, midsummer rainstorms in the north, post-flood season rainstorms in South China, autumn rainy season rainstorms in West China, and northwest rainstorms.
[0003] Hydrological phenomena are time-varying phenomena. This process of change is called a hydrological process. The discrete record of the hydrological process is hydrological data. According to the physical quantities it describes (such as water level, flow, rainfall, etc.), it is divided into various types of hydrological time series. Hydrological time series is a discrete ordered set of hydrological elements observed over time. Hydrological time series has many characteristics such as randomness, fuzziness, nonlinearity, non-stationarity, and multi-scale changes. Its characteristics are complex and changeable, and its components are also extremely complex. Studying the characteristics and prediction methods of hydrological time series, especially using observed hydrological series for hydrological prediction, has important practical significance for medium- and long-term hydrological forecasts.
[0004] Hydrological forecasting is an applied science that predicts the hydrological elements that will occur in the future based on known information (obtained from monitoring or analysis). Its forecast results will provide a scientific basis for decision makers, and hydrological models are the core tools of flood forecasting. Research on flood disaster forecasting and early warning is an important scientific support for the implementation of flood disaster prevention work. Constructing a flood forecasting model with high forecasting accuracy, strong applicability, simple calculation and easy promotion is a key technology in flood disaster forecasting and early warning research. Machine learning is one of the methods to realize artificial intelligence, and deep learning is the mainstream technology for realizing machine learning. The explosive development of deep learning has brought innovation and breakthroughs to many research fields, and it will also become one of the ways to promote the solution of flood forecasting problems. However, deep neural network is a complex structure with high nonlinearity, which can be regarded as a "black box" model in essence. Obviously, this opaque modeling technology cannot be trusted in many fields, which seriously limits the use of deep learning models in many sensitive or high-risk fields. Therefore, the interpretability of deep learning models in the field of hydrological forecasting also needs to be improved. It is urgent to study how the decision results of deep learning models are understood by humans and how to make deep learning models as transparent as possible. Summary of the invention
[0005] Purpose of the invention: Use deep learning technology to integrate different models to complement each other and optimize them, so that they can achieve higher accuracy and efficiency, provide efficient and accurate data and knowledge support for applications such as flood control and drought relief, water conservancy project planning and design, water resources management and development, and promote the deep analysis and continuous use of hydrological time series data. In view of the problem that users find it difficult to understand the model working mode and prediction results due to the highly nonlinear and complex structure of the "black box" model of the deep neural network, the interpretable method SHAP is applied to the hydrological time series prediction model, the internal structure of the deep learning model is mined, and the model results are interpreted and analyzed, which effectively enhances the certainty and confidence of the model.
[0006] Technical solution: The present invention provides a method for constructing an interpretable hydrological time series prediction model, which is characterized by: focusing on the model prediction accuracy while also focusing on the model's interpretation performance. While ensuring that the model prediction is fast and accurate, it can also grasp the importance of each feature to the model prediction result, as well as the interaction between different features. The specific construction steps are:
[0007] Step S1: Obtain hydrological forecast monitoring data. The acquired data should include timestamp, station ID, measurement type (such as water level, flow, etc.) and possible environmental variables (such as rainfall, etc.);
[0008] Step S2: Preprocessing of monitoring data. Processing of missing values, correction of erroneous values and normalization of monitoring data;
[0009] Step S3: constructing the best feature subset. Perform feature selection on the target data set using different feature selection methods, and select at least 3 groups of best feature subsets;
[0010] Step S4: Prediction model construction and comparative analysis. Current machine learning algorithms can be divided into two categories according to their interpretability. One type is that the model itself has good interpretability due to its simple structure and clear working principle, while the other type is that the model has a complex structure and a vague working principle. It is not interpretable itself and needs to be explained in other ways. Therefore, appropriate models from these two types are selected to train the at least three groups of optimal feature subsets respectively, and multiple groups of intelligent prediction models are constructed. Each group of models is comprehensively evaluated by the evaluation indicators to obtain the final target prediction model;
[0011] Step S5: Target model interpretation. The SHAP interpretation tool is used to perform global and local interpretations on the target prediction model; the global interpretation is mainly used to analyze the overall decision logic and working mode of the target prediction model, calculate and generate a complete explanation for the sample as a whole, analyze the influencing factors in the feature subset, and discover potential factors that affect the target outcome; the local interpretation is used to analyze the decision basis of the target prediction model for a single instance, give the decision logic or basis of the target prediction model for each input sample, and explain the classification results to enhance the credibility of the model.
[0012] Furthermore, in step S3, the target data set is subjected to feature selection optimization by using different feature selection methods, wherein the feature selection methods mainly include chi-square test method, variance selection method and mutual information screening method. The specific process of selecting multiple groups of optimal feature subsets according to these three feature selection methods is as follows:
[0013] The first is to use the chi-square test method to construct a contingency table for each feature, showing the frequency of each category of the feature and each category of the target variable. Calculate the chi-square statistic:
[0014]
[0015] Among them, O is the observed frequency and E is the expected frequency. The p-value is calculated based on the chi-square statistic and the degree of freedom, and finally the significance test is performed based on the p-value to select the appropriate features;
[0016] The second method is to use the variance selection method to calculate the variance of each feature and filter the feature subset according to the set variance threshold.
[0017] The third method is to use the mutual information screening method to calculate the mutual information value between each feature and the target variable:
[0018]
[0019] Among them, I(X;Y) is the mutual information of random variables X and Y, p(x,y) is the joint probability distribution of X and Y, and p(x) and p(y) are their respective probability distributions. Finally, the feature selection threshold is set through experience or cross-validation, and the selected feature subset is finally output based on the threshold.
[0020] Furthermore, the prediction models that can be used to construct in step S4 are divided into two categories, one is a model with a simple structure and a clear working principle, and the other is a model with a relatively complex structure and an unclear working principle. Models that have good interpretability include linear regression, decision tree, support vector machine SVM, etc., while models that are complex and not interpretable include neural network CNN, time series prediction model LSTM, etc. By performing the same training process on each group of models, at least three groups of intelligent prediction models are established.
[0021] Furthermore, the indicators used for comprehensive evaluation of the model in step S4 include R2, RMSE, and MAE. The performance of each group of prediction models is comprehensively evaluated by these three evaluation indicators, and the final target prediction model is comprehensively selected.
[0022] Furthermore, in step S5, the SHAP interpretation tool is used to perform global and local interpretations on the target prediction model. Shapley value is a concept in game theory that can measure the contribution of each member of the alliance to the overall goal of the alliance. When Shapley theory is used to interpret machine learning models, the input feature x is regarded as a participating member, and the probability distribution f(x) output by the model is regarded as the overall goal of the alliance. By measuring the contribution of each feature, important features are mined, thereby providing a basis for interpretability judgment. Its mathematical model is as follows:
[0023]
[0024] Among them, g is the explanation model, f(x) is the machine learning model, and in this patent, it is the target prediction model obtained above, and Z′ j ={0, 1}M indicates whether the corresponding feature is observed, M is the number of input features, is the attributed value of each feature, is a constant of the explanation model. The global explanation calculates the global SHAP value of the sample, analyzes the overall decision logic and working mechanism of the target prediction model, identifies the main influencing factors in the feature subset, and reveals the potential factors that affect the target prediction results.
[0025] For a specific input data x0, the calculation formula of its Shapley value is as follows:
[0026]
[0027] in, represents the contribution of feature i in function f, N S is a set of all features, S represents a feature subset, N S / {i} represents the SIn the above example, feature i is removed from the subset S, S∪(i) indicates adding feature i to the subset S, and |S| indicates the number of elements in S. Local explanations analyze each input sample separately to reveal the decision basis of the target prediction model for a specific instance, and provide detailed information on the decision logic and basis, thereby enhancing the credibility and usability of the final model.
[0028] The present invention has the following beneficial effects:
[0029] (1) The framework for constructing a hydrological time series intelligent prediction model constructed by the present invention adopts four modules: data collection and construction, optimal feature subset construction, prediction model training and evaluation, and target model interpretation. On the basis of effectively improving the prediction accuracy of the model, it also pays attention to the interpretation performance of the model, providing a reliable auxiliary basis for the decision-making of model users.
[0030] (2) The present invention uses deep learning technology to fuse and optimize different models to achieve higher accuracy and efficiency, and provide efficient and accurate data and knowledge support for applications such as flood control and drought relief, water conservancy project planning and design, and water resources management and development, thereby promoting the in-depth analysis and sustainable use of hydrological time series data.
[0031] (3) The present invention aims to solve the problem that users find it difficult to understand the model working mode and prediction results due to the highly nonlinear and complex structure of the "black box" model of the deep neural network. The method of data preprocessing and optimal feature subset construction effectively improves the credibility of the "black box" model. The interpretable method SHAP is applied to the hydrological time series prediction model to explore the internal structure of the deep learning model and interpret and analyze the model results from both global and local perspectives, effectively enhancing the certainty and credibility of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 The method for constructing a hydrological time series prediction model with interpretability provided in Example 1 of the present invention;
[0033] Figure 2 It is a schematic diagram of each structural module of the process of constructing an interpretable hydrological time series prediction model provided in Example 2 of the present invention;
[0034] Figure 3 It is a schematic diagram of a specific flow chart of a model interpretation module in an embodiment of the present invention; DETAILED DESCRIPTION
[0035] The technical solution of the present invention is described in detail below so that those skilled in the art can understand the present invention. However, the protection scope of the present invention is not limited to the scope of the embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
[0036] Embodiment 1:
[0037] like Figure 1 As shown, this embodiment provides a method for constructing a hydrological time series prediction model with interpretability, which specifically includes the following steps:
[0038] Step S1: Obtain hydrological forecast monitoring data. The acquired data should include timestamp, station ID, measurement type (such as water level, flow, etc.) and possible environmental variables (such as rainfall, etc.);
[0039] Step S2: Preprocessing of monitoring data. Processing of missing values, correction of erroneous values and normalization of monitoring data;
[0040] Step S3: constructing the best feature subset. Perform feature selection on the target data set through different feature selection methods to select multiple groups of best feature subsets;
[0041] Step S4: Prediction model construction and comparative analysis. Current machine learning algorithms can be divided into two categories according to their interpretability. One type is that the model itself has good interpretability due to its simple structure and clear working principle, while the other type is that the model has a complex structure and a vague working principle. It is not interpretable itself and needs to be explained in other ways. Therefore, appropriate models from these two types are selected to train the at least three groups of optimal feature subsets respectively, and at least three groups of intelligent prediction models are constructed. Each group of models is comprehensively evaluated by evaluation indicators (R2\RMSE\MAE) to obtain the final target prediction model;
[0042] Step S5: Target model interpretation. The SHAP interpretation tool is used to perform global and local interpretations on the target prediction model; the global interpretation is mainly used to analyze the overall decision logic and working mode of the target prediction model, calculate and generate a complete explanation for the sample as a whole, analyze the influencing factors in the feature subset, and discover potential factors that affect the target outcome; the local interpretation is used to analyze the decision basis of the target prediction model for a single instance, give the decision logic or basis of the target prediction model for each input sample, and explain the classification results to enhance the credibility of the model.
[0043] In step S2 of this embodiment, data preprocessing includes missing value processing, that is, using appropriate strategies (such as mean filling, interpolation, etc.) to process missing data to ensure the integrity of the data set. Error value correction, that is, improving data quality by detecting and correcting outliers and inconsistent data points. Normalization processing, that is, normalizing each monitoring indicator to eliminate the impact of different units and numerical ranges on subsequent analysis, to ensure the stability and accuracy of the model.
[0044] In step S3 of this embodiment, the target data set is subjected to feature selection optimization through different feature selection methods, wherein the feature selection methods mainly include chi-square test method, variance selection method and mutual information screening method. The specific process of selecting multiple groups of optimal feature subsets according to these three feature selection methods is as follows:
[0045] Three different methods can be used for feature selection: the first is to use the chi-square test method to construct a contingency table for each feature, calculate the chi-square statistic, and calculate the p-value based on the chi-square statistic and degrees of freedom, and finally perform a significance test based on the p-value to select appropriate features; the second is to use the variance selection method to calculate the variance of each feature, and filter the feature subset according to the set variance threshold; the third method is to use the mutual information screening method to calculate the mutual information value between each feature and the target variable, set the feature selection threshold through experience or cross-validation, and finally output the selected feature subset according to the threshold.
[0046] In step S4 of the present embodiment, the prediction models that can be used to build are divided into two categories, one is a model with a simple structure and a clear working principle, and the other is a model with a relatively complex structure and an unclear working principle. Models that have good interpretability include linear regression, decision tree, support vector machine SVM, etc., while models that are complex and not interpretable include neural network CNN, time series prediction model LSTM, etc. By performing the same training process on each group of models, multiple groups of intelligent prediction models are established. And the indicators used for comprehensive evaluation of the model include determination coefficient R2, root mean square error RMSE, and mean absolute error MAE. The performance of each group of prediction models is comprehensively evaluated by these three evaluation indicators, and the final target prediction model is comprehensively selected.
[0047] In step S5 of this embodiment, the SHAP interpretation tool is used to perform global and local interpretations on the target prediction model. Shapley value is a concept in game theory that can measure the contribution of each member in the alliance to the overall goal of the alliance. When Shapley theory is used to interpret machine learning models, the input feature x is regarded as a participating member, and the probability distribution f(x) output by the model is regarded as the overall goal of the alliance. By measuring the contribution of each feature, important features are mined, thereby providing a basis for interpretability judgment. Its mathematical model is as follows:
[0048]
[0049] Among them, g is the explanation model, f(x) is the original machine learning model, Zj={0,1}M indicates whether the corresponding feature is observed, M is the number of input features, φ j is the attributed value of each feature, and φ0 is the constant of the explanation model. Global explanation calculates the global SHAP value of the sample, analyzes the overall decision logic and working mechanism of the target prediction model, identifies the main influencing factors in the feature subset, and reveals the potential factors that affect the target prediction results.
[0050] For a specific input data x0, the calculation formula of its Shapley value is as follows:
[0051]
[0052] Among them, φ i (f) represents the contribution of feature i in function f, N S is a set of all features, S represents a feature subset, N S / {i} represents the S In the above example, feature i is removed from the subset S, S∪{i) indicates adding feature i to the subset S, and |S| indicates the number of elements in S. Local explanations analyze each input sample separately to reveal the decision basis of the target prediction model for a specific instance, and provide detailed information on the decision logic and basis, thereby enhancing the credibility and usability of the final model.
[0053] Embodiment 2:
[0054] like Figure 2 As shown, this embodiment provides a schematic diagram 20 of the structural modules of the process of constructing an interpretable hydrological time series prediction model according to the method described in Example 1, specifically including:
[0055] Dataset construction module 21: preprocessing the monitoring data, performing missing value processing, error value correction and normalization processing on the monitoring data, and dividing the data set to obtain the target data set.
[0056] In this embodiment, the data set construction module 21 includes a preprocessing unit 211 and a data set division unit 212. The preprocessing unit 211 is mainly used to process missing values, correct error values and normalize the original data; the data set division unit 212 is mainly used to divide the preprocessed data set into a training set, a validation set and a test set in a ratio of 6:2:2.
[0057] The best feature subset construction module 22 is used to perform feature selection and optimization on the target data set through different feature selection methods, and select multiple groups of best feature subsets.
[0058] In this embodiment, the optimal feature subset construction module 22 mainly includes a chi-square test screening unit 221, a variance selection screening unit 222 and a mutual information screening unit 223.
[0059] The chi-square test screening unit 221 constructs a contingency table for each feature, showing the frequency of each category of the feature and each category of the target variable. Calculate the chi-square statistic:
[0060]
[0061] Among them, O is the observed frequency and E is the expected frequency. The p-value is calculated based on the chi-square statistic and the degree of freedom, and finally the significance test is performed based on the p-value to select the appropriate features;
[0062] The variance selection and screening unit 222 calculates the variance of each feature using the variance selection method, and screens the feature subset according to the set variance threshold;
[0063] The mutual information screening unit 223 uses the mutual information screening method to calculate the mutual information value between each feature and the target variable:
[0064]
[0065] Among them, I(X;Y) is the mutual information of random variables X and Y, p(x,y) is the joint probability distribution of X and Y, and p(x) and p(y) are their respective probability distributions. Finally, the feature selection threshold is set through experience or cross-validation, and the selected feature subset is finally output based on the threshold.
[0066] Prediction model training and evaluation module 23: Prediction model construction and comparative analysis. Current machine learning algorithms can be divided into two categories according to their interpretability. One type is that the model itself has good interpretability due to its simple structure and clear working principle, while the other type is that the model has a complex structure and a vague working principle. It is not interpretable itself and needs to be explained in other ways. Therefore, appropriate models from these two types are selected to train the multiple groups of optimal feature subsets respectively, and multiple groups of intelligent prediction models are constructed. Each group of models is comprehensively evaluated by the evaluation indicators to obtain the final target prediction model;
[0067] In this embodiment, the prediction model training and evaluation module 23 mainly includes an interpretable model training unit 231, an uninterpretable model training unit 232 and a model evaluation unit 233. The interpretable model training unit 231 selects models that have good interpretability, such as linear regression, decision tree, support vector machine SVM, etc. The uninterpretable model training unit 232 selects models that are complex and uninterpretable, such as neural network CNN, time series prediction model LSTM, etc. The same training process is carried out separately to establish at least three groups of intelligent prediction models. The model evaluation unit 233 uses the model comprehensive evaluation index determination coefficient R2, root mean square error RMSE, and mean absolute error MAE. The performance of each group of prediction models is comprehensively evaluated by these three evaluation indicators, and the final target prediction model is comprehensively selected.
[0068] Target model interpretation module 24: Use SHAP interpretation tool to perform global and local interpretation on the target prediction model. The specific process is as follows: Figure 3 shown.
[0069] In this embodiment, the target model interpretation module 24 includes a global interpretation unit 241 and a local interpretation unit 242. The global interpretation unit 241 is mainly used to analyze the overall decision logic and working mode of the target prediction model, calculate the global SHAP value, and generate a global view by aggregating the SHAP value of each sample, further revealing the interaction between features. Based on the global SHAP value, the global interpretation unit 241 visualizes and generates a feature importance ranking diagram to show which features play a key role in the model decision. Finally, through global feature analysis, potential causal relationships and error sources can be discovered, which facilitates researchers and decision makers to identify the shortcomings of model performance and make targeted improvements; the local interpretation unit 242 is used to analyze the decision basis of the target prediction model for a single instance. By calculating the SHAP value for each input sample, the local interpretation unit 242 provides the decision logic for the specific sample. The calculated SHAP value indicates the specific contribution of each feature in the instance, thereby revealing the specific reasons for the model's prediction of the instance and visualizing the decision process.
Claims
1. A method for constructing an interpretable hydrological time series prediction model, characterized by: On the basis of paying attention to the prediction accuracy of the model, we also pay attention to the interpretation performance of the model; while ensuring the fast and accurate prediction of the model, we can also grasp the importance of each feature to the model prediction results, as well as the interaction between different features; The construction steps are: Step S1: Obtain hydrological forecast monitoring data: The acquired data should include timestamp, station ID, measurement type (such as water level, flow, etc.) and possible environmental variables (such as rainfall, etc.); Step S2: Monitoring data preprocessing: performing missing value processing, error value correction and normalization processing on the monitoring data; Step S3: constructing the best feature subset: performing feature selection on the target data set by using different feature selection methods, and selecting at least 3 groups of best feature subsets; Step S4: Prediction model construction and comparative analysis: The current machine learning algorithms can be divided into two categories according to their interpretability; one type is that the model itself has good interpretability due to its simple structure and clear working principle, while the other type is that the model structure is complex and the working principle is vague, which is not interpretable and needs to be explained in other ways; therefore, suitable models of these two types are selected to train the at least three groups of optimal feature subsets respectively, and multiple groups of intelligent prediction models are constructed; each group of models is comprehensively evaluated by evaluation indicators to obtain the final target prediction model; Step S5: Target model interpretation: Use the SHAP interpretation tool to perform global and local interpretations on the target prediction model; the global interpretation is mainly used to analyze the overall decision logic and working mode of the target prediction model, calculate and generate a complete explanation for the sample as a whole, analyze the influencing factors in the feature subset, and discover potential factors affecting the target outcome; the local interpretation is used to analyze the decision basis of the target prediction model for a single instance, give the decision logic or basis of the target prediction model for each input sample, and explain the classification results to enhance the credibility of the model.
2. The method for constructing an interpretable hydrological time series prediction model according to claim 1, characterized in that: In step S3, the target data set is subjected to feature selection optimization by using different feature selection methods, wherein the feature selection methods mainly include chi-square test method, variance selection method and mutual information screening method; the specific process of selecting multiple groups of optimal feature subsets according to these three feature selection methods is as follows: Three different methods can be used for feature selection: the first is to use the chi-square test method to construct a contingency table for each feature, calculate the chi-square statistic, and calculate the p-value based on the chi-square statistic and degrees of freedom, and finally perform a significance test based on the p-value to select appropriate features; the second is to use the variance selection method to calculate the variance of each feature, and filter the feature subset according to the set variance threshold; the third method is to use the mutual information screening method to calculate the mutual information value between each feature and the target variable, set the feature selection threshold through experience or cross-validation, and finally output the selected feature subset according to the threshold.
3. The method for constructing an interpretable hydrological time series prediction model according to claim 1, characterized in that: The prediction models that can be used to construct in the step S4 are divided into two categories, one is a model with a simple structure and a clear working principle, and the other is a model with a relatively complex structure and an unclear working principle; the models that have good interpretability include linear regression, decision tree, support vector machine SVM, etc., while the models that are complex and not interpretable include neural network CNN, time series prediction model LSTM, etc.; by performing the same training process on each group of models, at least three groups of intelligent prediction models are established.
4. The method for constructing an interpretable hydrological time series prediction model according to claim 1, characterized in that: The indicators used for comprehensive evaluation of the model in step S4 include determination coefficient R2, root mean square error RMSE, and mean absolute error MAE; the performance of each group of prediction models is comprehensively evaluated by these three evaluation indicators, and the final target prediction model is comprehensively selected.
5. The method for constructing an interpretable hydrological time series prediction model according to claim 1, characterized in that: In step S5, the target prediction model is globally and locally interpreted using the SHAP interpretation tool. Shapley value is a concept in game theory that can measure the contribution of each member in the alliance to the overall goal of the alliance. When Shapley theory is used to interpret the machine learning model, the input feature x is regarded as a participating member, and the probability distribution f(x) output by the model is regarded as the overall goal of the alliance. By measuring the contribution of each feature, important features are mined, thereby providing a basis for interpretability judgment. Its mathematical model is as follows: Among them, g is the explanation model, f(x) is the original machine learning model, Z′j={0,1}M indicates whether the corresponding feature is observed, M is the number of input features, φ j is the attribution value of each feature, and φ0 is the constant of the explanation model; the global explanation calculates the global SHAP value of the sample, analyzes the overall decision logic and working mechanism of the target prediction model, identifies the main influencing factors in the feature subset, and reveals the potential factors that affect the target prediction results; For a specific input data x0, the calculation formula of its Shapley value is as follows: Among them, φ i (f) represents the contribution of feature i in function f, N S is a set of all features, S represents a feature subset, N S / {i} represents the S The feature i is removed from the subset S, S∪(i) means adding feature i to the subset S, and |S| means the number of elements in S. The local explanation reveals the decision basis of the target prediction model for a specific instance by analyzing each input sample separately, and provides detailed information on the decision logic and basis, thereby enhancing the credibility and usability of the final model.