SHAP feature attribution method, device, equipment and readable storage medium
In the SHAP feature attribution method in the field of financial technology, the data to be explained is distributed to the execution end to calculate the marginal benefit expectation and label expectation value in parallel, and combined with the post-processing step to remove outlier interference, the problem of low SHAP value calculation efficiency is solved. The efficiency of model interpretation is improved.
Patent Information
- Application Number
- CN202010088686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-11
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-02-11
AI Technical Summary
The SHAP-based model interpretation efficiency in the existing technology is low, mainly due to the low calculation efficiency of SHAP values and the inability to effectively parallelize calculations, which makes it difficult to achieve high efficiency in model interpretation in the field of financial technology.
By distributing the data to be explained to the execution end, the marginal benefit expectation of sample features and the label expectation value are calculated in parallel, and the preset model is used to calculate SHAP results in parallel, combined with post-processing steps to remove outlier interference and improve model interpretation efficiency.
The calculation efficiency of SHAP values and the efficiency of model interpretation are improved, making model interpretation in the field of financial technology more intuitive and efficient, and solving the problem of low model interpretation efficiency in the existing technology.
Smart Images

Figure CN111340231B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a SHAP feature attribution method, device, equipment and readable storage medium. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, but the financial industry also puts forward higher requirements on technology, such as higher requirements on the distribution of corresponding to-do items in the financial industry.
[0003] With the continuous development of computer software and artificial intelligence, the application of machine learning has become more and more extensive, and a series of high-performance machine learning models have been developed, such as random forests, gradient boosting trees, deep learning, etc. However, the internal principles of these machine learning models are difficult to understand. In business application scenarios, modelers find it difficult to understand these models, which makes it difficult for modelers to apply and debug these machine learning models. At present, SHAP (SHapley Additive ex Planations) is usually used to explain the model to help modelers understand the model. However, when calculating the SHAP result of the model, a large number of samples are often required, and the current SHAP calculation method can only be implemented on a single machine, which leads to a high time complexity for calculating the global SHAP result of a single sample, low SHAP value calculation efficiency, and low efficiency of model interpretation based on SHAP. Therefore, there is a technical problem of low efficiency of model interpretation based on SHAP in the prior art. Summary of the invention
[0004] The main purpose of this application is to provide a SHAP feature attribution method, device, equipment and readable storage medium, aiming to solve the technical problem of low efficiency of SHAP-based model interpretation in the prior art.
[0005] To achieve the above object, the present application provides a SHAP feature attribution method, which is applied to a driver end and includes:
[0006] Acquire the data to be interpreted, and distribute the data to be interpreted to the execution end associated with the driving end;
[0007] Broadcasting the preset model to be explained to the execution end, so that the execution end can parallelly calculate the expected marginal benefit and the expected value of the annotation label corresponding to each sample feature in the data to be explained based on the model to be explained;
[0008] The marginal benefit expectations and the expected values of the annotation labels fed back by the execution end are received, and based on the marginal benefit expectations and the expected values of the annotation labels, a SHAP result corresponding to the data to be explained is calculated.
[0009] Optionally, the data to be interpreted includes one or more features.
[0010] The step of calculating the SHAP result corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels includes:
[0011] An input data table corresponding to each of the marginal benefit expectations is generated, and the input data table and the expected value of the annotated label are substituted into a preset SHAP result calculation formula, and the SHAP results corresponding to each of the features are calculated in parallel.
[0012] Optionally, the step of generating an input data table corresponding to each of the marginal benefit expectations, substituting the input data table and the expected value of the annotation label into a preset SHAP result calculation formula, and calculating the SHAP results corresponding to each of the features in parallel comprises:
[0013] Each of the sample features is post-processed to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and the post-processed sample features and the SHAP result are displayed.
[0014] Optionally, the SHAP result includes one or more SHAP values, and the post-processing includes range clamping and re-arranging.
[0015] The step of post-processing each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and displaying the post-processed sample features and the SHAP result includes:
[0016] Performing the range clamping process on the sample features to obtain limited range data;
[0017] The limited range data is rearranged to establish a mapping relationship between each of the sample features and each of the SHAP values, to obtain the data to be displayed, and to display the data to be displayed.
[0018] Optionally, the sample feature includes a first sample feature and a second sample feature.
[0019] The step of displaying the data to be displayed comprises:
[0020] Based on the data to be displayed, establishing a model explanation scatter plot corresponding to the first sample feature;
[0021] Based on the sample feature values corresponding to the second sample feature, each scatter point in the model explanation scatter plot is colored, and the colored model explanation scatter plot is displayed.
[0022] Optionally, the abnormal points include missing values and outliers.
[0023] The step of performing the range clamping process on the sample feature to obtain limited range data comprises:
[0024] Determine a first type of feature corresponding to the missing value in the data to be explained, and map the missing value to an outlier threshold edge range corresponding to the first type of feature;
[0025] Determine a second type of feature corresponding to the outlier in the data to be explained, and map the outlier to a value outside a threshold range of the outlier corresponding to the second type of feature to obtain the limited range data.
[0026] To achieve the above purpose, the present application also provides a SHAP feature attribution method, which is applied to the execution end and includes:
[0027] Receiving data to be interpreted and a model to be interpreted sent by a driver end associated with the execution end, and selecting a model input sample set from the data to be interpreted;
[0028] Inputting each element in the model input sample set into the model to be explained respectively to obtain a model output result set, and based on the model output result set, obtaining an expected value of annotated labels corresponding to each sample feature in the data to be explained;
[0029] Based on the model output result set, the marginal benefit expectations corresponding to each of the sample features are calculated in parallel through the preset marginal benefit expectation calculation formula, and the labeled label expectation value and each marginal benefit expectation are fed back to the driving end so that the driving end can calculate the SHAP result corresponding to the data to be explained and display the SHAP result.
[0030] Optionally, the data to be explained corresponds to one or more sample features, the model input sample set includes one or more model input elements, and the model input elements include one or more first type elements and one or more second type elements.
[0031] The step of selecting a model input sample set from the data to be explained comprises:
[0032] Selecting a target feature from each of the sample features, and removing the target feature from the data to be interpreted to obtain a removed data set, and selecting one of the first type elements from the removed data set, wherein the first type element is a subset of the removed data set;
[0033] Adding the target feature to the first type element to obtain one of the second type elements;
[0034] The target feature is reselected from the sample features to obtain other elements of the first type and other elements of the second type, until the target feature does not exist in the data to be interpreted, thereby obtaining the model input sample set.
[0035] The present application also provides a SHAP feature attribution device, which is a virtual device and is applied to a driver end. The SHAP feature attribution device includes:
[0036] An acquisition module, used for acquiring data to be interpreted, and distributing the data to be interpreted to an execution end associated with the driving end;
[0037] A parallel computing module, used for broadcasting a preset model to be explained to the execution end, so that the execution end can parallelly calculate the expected marginal benefit and the expected value of the annotation label corresponding to each sample feature in the data to be explained based on the model to be explained;
[0038] A receiving module is used to receive the marginal benefit expectations and the expected values of the annotation labels fed back by the execution end, and calculate the SHAP results corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels.
[0039] Optionally, the receiving module includes:
[0040] The acquisition unit is used to generate an input data table corresponding to each of the marginal benefit expectations, and substitute the input data table and the expected value of the annotation label into a preset SHAP result calculation formula, and calculate the SHAP results corresponding to each of the features in parallel.
[0041] Optionally, the SHAP feature attribution device further includes:
[0042] The post-processing display module is used to perform post-processing on each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and to display the post-processed sample features and the SHAP result.
[0043] Optionally, the post-processing display module includes:
[0044] A range clamping processing unit, used for performing the range clamping processing on the sample feature to obtain limited range data;
[0045] A display unit is used to rearrange the limited range data to establish a mapping relationship between each sample feature and each SHAP value, obtain data to be displayed, and display the data to be displayed.
[0046] Optionally, the display unit includes:
[0047] Establishing a subunit, used for establishing a model explanation scatter plot corresponding to the first sample feature based on the data to be displayed;
[0048] A coloring subunit is used to color each scatter point in the model explanation scatter plot based on each sample feature value corresponding to the second sample feature, and to display the colored model explanation scatter plot.
[0049] Optionally, the range clamp processing unit includes:
[0050] A first mapping subunit is used to determine a first type of feature corresponding to the missing value in the data to be explained, and map the missing value to an outlier threshold edge range corresponding to the first type of feature;
[0051] The second mapping subunit is used to determine the second type of feature corresponding to the outlier in the data to be explained, and map the outlier to outside the outlier upper threshold range corresponding to the second type of feature to obtain the limited range data.
[0052] To achieve the above object, the present application further provides a SHAP feature attribution device, which is applied to an execution end and includes:
[0053] A receiving module, configured to receive the data to be interpreted and the model to be interpreted sent by the driver end associated with the execution end, and select a model input sample set from the data to be interpreted;
[0054] A model prediction module, used for inputting each element in the model input sample set into the model to be explained, obtaining a model output result set, and obtaining an expected value of a label corresponding to each sample feature in the data to be explained based on the model output result set;
[0055] A feedback module is used to calculate the marginal benefit expectations corresponding to each of the sample features in parallel based on the set of model output results, by using a preset marginal benefit expectation calculation formula, and to feed back the annotation label expectation value and each marginal benefit expectation to the driver end, so that the driver end can calculate the SHAP result corresponding to the data to be explained, and display the SHAP result.
[0056] Optionally, the receiving module includes:
[0057] A rejection unit, configured to select a target feature from each of the sample features, reject the target feature from the data to be interpreted, obtain a rejection data set, and select one of the first type elements from the rejection data set, wherein the first type element is a subset of the rejection data set;
[0058] A union unit, configured to add the target feature to the first type element to obtain one of the second type elements;
[0059] A selection unit is used for reselecting the target feature from the sample features to obtain other elements of the first type and other elements of the second type, until the target feature does not exist in the data to be interpreted, thereby obtaining the model input sample set.
[0060] The present application also provides a SHAP feature attribution device, which is a physical device. The SHAP feature attribution device includes: a memory, a processor, and a program of the SHAP feature attribution method stored in the memory and executable on the processor. When the program of the SHAP feature attribution method is executed by the processor, the steps of the SHAP feature attribution method as described above can be implemented.
[0061] The present application also provides a readable storage medium, on which is stored a program for implementing the SHAP feature attribution method. When the program of the SHAP feature attribution method is executed by a processor, the steps of the SHAP feature attribution method as described above are implemented.
[0062] The present application obtains the data to be explained and distributes the data to be explained to the execution end associated with the driving end, and then broadcasts the preset model to be explained to the execution end, so that the execution end can calculate the marginal benefit expectation and the expected value of the label label corresponding to each sample feature in the data to be explained in parallel based on the model to be explained, and then receive the marginal benefit expectation and the expected value of the label label fed back by the execution end, and calculate the SHAP result corresponding to the data to be explained based on each marginal benefit expectation and the expected value of the label label, and then post-process the sample features, and display the post-processed sample features and the SHAP result. That is, the present application first sends the obtained data to be explained and the preset model to be explained to the execution end, so that the execution end can perform parallel calculations of the marginal benefit expectation and the expected value of the label label corresponding to each sample in the data to be explained, and then based on each marginal benefit expectation and the expected value of the label label, the SHAP result corresponding to the data to be explained can be calculated, and then by post-processing the sample features, the post-processed sample features and the SHAP result can be displayed. That is, the present application sends the acquired data to be interpreted and the preset model to be interpreted to the execution end, so that the execution end can perform parallel calculation of the marginal benefit expectation and the annotation label expectation corresponding to each sample in the data to be interpreted, thereby realizing distributed parallel calculation of the marginal benefit expectation, improving the calculation efficiency of the marginal benefit expectation, and thus improving the efficiency of the model interpretation based on SHAP, thereby solving the technical problem of low efficiency of the model interpretation based on SHAP. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0065] Figure 1 This is a flow chart of the first embodiment of the SHAP feature attribution method of the present application;
[0066] Figure 2 A schematic diagram of the model interpretation scatter plot before coloring in the SHAP feature attribution method of the present application;
[0067] Figure 3 This is a flow chart of the second embodiment of the SHAP feature attribution method of the present application;
[0068] Figure 4 This is a flow chart of the third embodiment of the SHAP feature attribution method of the present application;
[0069] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0070] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0071] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0072] The present application embodiment provides a SHAP feature attribution method, the SHAP feature attribution method is applied to the driver end. In the first embodiment of the SHAP feature attribution method of the present application, refer to Figure 1 , the SHAP feature attribution method includes:
[0073] Step S10, obtaining the data to be interpreted, and distributing the data to be interpreted to the execution end associated with the driving end;
[0074] In this embodiment, it should be noted that the data to be interpreted includes one or more samples to be interpreted, and the samples to be interpreted include one or more sample features, wherein, in each sample to be interpreted, each sample feature corresponds to a sample feature value, and the execution end includes an executor of a spark cluster.
[0075] The data to be interpreted is obtained, and the data to be interpreted is distributed to the execution end associated with the driving end. Specifically, the data to be interpreted is extracted from a preset local database, and the data to be interpreted is read into the memory of the execution end associated with the driving end.
[0076] Step S20, broadcasting the preset model to be explained to the execution end, so that the execution end can calculate the marginal benefit expectation and the annotation label expectation corresponding to each sample feature in the data to be explained in parallel based on the model to be explained;
[0077] In this embodiment, it should be noted that the preset model to be explained is a trained machine learning model, and the preset model to be explained includes a random forest model, a gradient boosting tree model, and a deep learning model, etc. The expected value of the annotated label is associated with the prediction target of the preset model to be explained. For example, assuming that the prediction target of the model to be explained is to determine whether the user is a high-quality customer, the data to be explained includes 10,000 samples, of which 9,999 samples are input into the preset model to be explained, and the prediction result is that the user is a high-quality customer, and the label of the high-quality customer is 1. For the predicted model to be explained, the probability of determining that the user is a high-quality customer is 0.9999, and the expected value of the annotated label is 0.9999.
[0078] The preset model to be explained is broadcasted to the execution end, so that the execution end can calculate the marginal benefit expectation and the expected value of the annotation label corresponding to each sample feature in the data to be explained in parallel based on the model to be explained. Specifically, the preset model to be explained is broadcasted to the execution end, so that the execution end can select a model input sample set from the data to be explained, and input each element in the model input sample set into the model to be explained respectively to obtain a model output result set, and based on the model output result set, obtain the expected value of the annotation label corresponding to each sample feature in the data to be explained, and based on the model output result set, calculate the marginal benefit expectation corresponding to each sample feature in parallel through a preset marginal benefit expectation calculation formula, and feed back the expected value of the annotation label and each marginal benefit expectation to the driving end, so that the driving end can calculate the SHAP result corresponding to the data to be explained, wherein the preset marginal benefit expectation calculation formula is as follows,
[0079]
[0080] Among them, φ i is the marginal benefit expectation, F is the sample feature set corresponding to the data to be explained, F\{i} is the eliminated data set after removing the i-th feature from F, S is a subset of the eliminated data set, is the output value of the model to be explained on the set S, f s∪{i} (x s∪{i}) is the output value of the model to be explained after S set and feature i, then the eliminated feature is the i-th feature and the probability that the eliminated data set is S accounts for all cases is the fractional coefficient with factorial symbol in the preset marginal benefit expectation calculation formula, wherein it should be noted that the data to be explained includes one or more samples to be explained, and the samples to be explained include one or more sample features. In each sample to be explained, each sample feature corresponds to a sample feature value. When the marginal benefit expectation is calculated in parallel at the execution end, the data to be explained will be input into the executor of the execution end in the form of a table or matrix for parallel calculation. wherein, if the data to be explained is input in the form of a table or a matrix, each row of the table or the matrix is a sample to be explained, and each column of the table is the corresponding sample feature value of each sample feature in each sample to be explained, and if the data to be explained is globally explained based on SHAP model based on the model to be predicted, then S is the eliminated data set, and the expected value of the annotation label is the model bias corresponding to all data in the data to be explained.
[0081] Step S30, receiving the marginal benefit expectations and the expected values of the annotation labels fed back by the execution end, and calculating the SHAP results corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels.
[0082] In this embodiment, each of the marginal benefit expectations and the expected values of the labeled labels fed back by the execution end is received, and based on each of the marginal benefit expectations and the expected values of the labeled labels, the SHAP result corresponding to the data to be explained is calculated. Specifically, each of the marginal benefit expectations and the expected values of the labeled labels fed back by the execution end is received, and the table or matrix corresponding to each of the marginal benefit expectations and the expected values of the labeled labels are substituted into a preset SHAP result calculation formula to obtain the SHAP result, wherein the SHAP result includes one or more SHAP values, and the SHAP result is represented in a tabular form or a matrix form, wherein each row of the table or matrix corresponds to a sample to be explained, and each column of the table or matrix corresponds to a sample feature, and each value of the table or matrix is the SHAP value, wherein the preset SHAP result calculation formula is as follows:
[0083]
[0084] Among them, z'∈{0,1} indicates whether the sample feature is involved in modeling. M represents the number of features in the data to be explained, φ0 represents the model bias, and φ j Indicates the contribution of the feature to the model prediction result, that is, φ j is the marginal benefit expectation, and g(z') is the SHAP value.
[0085] Wherein, in step S30, the data to be interpreted includes one or more features.
[0086] The step of calculating the SHAP result corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels includes:
[0087] Step S31, generating an input data table corresponding to each of the marginal benefit expectations, substituting the input data table and the expected value of the annotation label into a preset SHAP result calculation formula, and calculating the SHAP results corresponding to each of the features in parallel.
[0088] In this embodiment, an input data table corresponding to each of the marginal benefit expectations is generated, and the input data table and the expected values of the annotation labels are substituted into a preset SHAP result calculation formula, and the SHAP results corresponding to each of the features are calculated in parallel. Specifically, if the marginal benefit expectations fed back by the executor are not in the form of a preset table, each of the marginal benefit expectations is converted into a corresponding table to obtain the input data table, and the input data table and the expected values of the annotation labels are input into the execution unit corresponding to the preset SHAP result calculation formula, and parallel calculation of each of the SHAP values is performed to obtain a SHAP value table corresponding to each of the SHAP values, that is, to obtain the SHAP result.
[0089] This embodiment obtains the data to be explained and distributes the data to be explained to the execution end associated with the driving end, and then broadcasts the preset model to be explained to the execution end, so that the execution end can calculate the marginal benefit expectation and the expected value of the label label corresponding to each sample feature in the data to be explained in parallel based on the model to be explained, and then receive the marginal benefit expectation and the expected value of the label label fed back by the execution end, and calculate the SHAP result corresponding to the data to be explained based on each marginal benefit expectation and the expected value of the label label, and then post-process the sample features, and display the sample features and the SHAP result after post-processing. That is, this embodiment first sends the obtained data to be explained and the preset model to be explained to the execution end, so that the execution end can perform parallel calculations of the marginal benefit expectation and the expected value of the label label corresponding to each sample in the data to be explained, and then calculate the SHAP result corresponding to the data to be explained based on each marginal benefit expectation and the expected value of the label label, and then display the sample features and the SHAP result after post-processing by post-processing the sample features. That is, this embodiment sends the acquired data to be interpreted and the preset model to be interpreted to the execution end, so that the execution end can perform parallel calculation of the marginal benefit expectation and the annotation label expectation corresponding to each sample in the data to be interpreted, thereby realizing distributed parallel calculation of the marginal benefit expectation, improving the calculation efficiency of the marginal benefit expectation, and thus improving the efficiency of the model interpretation based on SHAP. Therefore, the technical problem of low efficiency of the model interpretation based on SHAP is solved.
[0090] Further, refer to Figure 2 Based on the first embodiment of the present application, in another embodiment of the SHAP feature attribution method, the step of generating an input data table corresponding to each marginal benefit expectation, substituting the input data table and the expected value of the annotation label into a preset SHAP result calculation formula, and calculating the SHAP results corresponding to each of the features in parallel includes:
[0091] Step S40, post-processing each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and displaying the post-processed sample features and the SHAP result.
[0092] In this embodiment, it should be noted that the post-processing includes range clamping processing, normalization processing, etc.
[0093] Each of the sample features is post-processed to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and the post-processed sample features and the SHAP result are displayed. Specifically, the sample features are range clamped to remove the visual interference of the abnormal points in each of the sample feature values on the SHAP result, and then based on the user's selection command, the features to be displayed are selected from each of the sample features, and the SHAP values corresponding to the features to be displayed and the features to be displayed are visually displayed, wherein the abnormal points include missing values, outliers, etc. In the example, there is a sample feature value corresponding to each sample. If the sample feature value corresponding to the sample feature in a sample to be explained is lost, the sample feature value corresponding to the sample feature in the sample to be explained is marked as a missing value. The outlier refers to a sample feature value that is no longer within the preset outlier threshold range. For example, assuming that 99% of the model output results corresponding to a sample feature range from 38 to 100, the outlier threshold range is greater than or equal to 38 and less than or equal to 100, and the sample feature values that are not within the outlier threshold range are marked as outliers.
[0094] The SHAP result includes one or more SHAP values, and the post-processing includes range clamping and re-arrangement.
[0095] The step of post-processing each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and displaying the post-processed sample features and the SHAP result includes:
[0096] Step S41, performing the range clamping process on the sample feature to obtain limited range data;
[0097] In this embodiment, it should be noted that the range clamping process is used to remove the interference of abnormal points in each sample feature value on the visual display of the SHAP result.
[0098] The sample features are range clamped to obtain limited range data. Specifically, based on the user's selection command, the features to be displayed are selected from the sample features, and the SHAP values to be displayed corresponding to the features to be displayed are determined in the SHAP result, and then the range clamping is performed on the SHAP values to be displayed to remove the visual interference of abnormal points in the sample feature values on the SHAP result.
[0099] The characteristic values include missing values and outliers, and the marginal benefit expectations include first-type SHAP values and second-type SHAP values.
[0100] The step of performing the range clamping process on the sample feature to obtain limited range data comprises:
[0101] Step S411, determining a first type of feature corresponding to the missing value in the data to be explained, and mapping the missing value to an outlier threshold edge range corresponding to the first type of feature;
[0102] In this embodiment, it should be noted that the data to be interpreted is saved and calculated in a tabular form or a matrix form, and each of the SHAP values in the corresponding SHAP results is also saved and calculated in a tabular form or a matrix form. The positions of the sample eigenvalues in the data to be interpreted and their corresponding SHAP values in the table or matrix are consistent, the missing values and the outliers are marked in the table or matrix corresponding to the data to be interpreted, and the outlier threshold edge range includes an outlier upper threshold edge range and an outlier lower threshold edge range.
[0103] Determine a first type of feature corresponding to the missing value in the data to be explained, and map the missing value to an outlier threshold edge range corresponding to the first type of feature. Specifically, based on the correspondence between the data to be explained and the SHAP result, determine the sample feature where the missing value is located, and use the sample feature corresponding to the missing value as the first type of feature. If the first type of feature is the feature to be displayed, determine a first abnormal SHAP value corresponding to the missing value, and calculate the distance between the first abnormal SHAP value and an outlier upper threshold and a lower threshold corresponding to the outlier threshold range. If the distance between the first abnormal SHAP value and the outlier upper threshold is greater than or equal to the distance between the first abnormal SHAP value and the outlier lower threshold, map the first abnormal SHAP value to an outlier lower threshold edge range corresponding to the outlier lower threshold. If the distance between the first abnormal SHAP value and the outlier upper threshold is less than the first abnormal SHAP value, The AP value is the distance from the outlier lower threshold, then the first abnormal SHAP value is mapped to the outlier upper threshold edge range corresponding to the outlier upper threshold. For example, assuming that the outlier threshold range is 38 to 100, the outlier upper threshold is 38, and then the outlier upper threshold edge range can be set to 37.5 to 38.5, the outlier lower threshold is 100, and then the outlier lower threshold edge range can be set to 99.5 to 100.5. Furthermore, if the first abnormal SHAP value is 97, 97 is mapped to 99.5 to 100.5. If the first abnormal SHAP value is 40, 40 is mapped to 37.5 to 38.5.
[0104] Step S412, determining a second type of feature corresponding to the outlier in the data to be explained, and mapping the outlier to a value outside an upper threshold range of the outlier corresponding to the second type of feature, to obtain the limited range data.
[0105] In this embodiment, the second type of feature corresponding to the outlier in the data to be explained is determined, and the outlier is mapped to outside the outlier upper threshold range corresponding to the second type of feature to obtain the limited range data. Specifically, based on the correspondence between the data to be explained and the SHAP result, the sample feature where the outlier is located is determined, and the sample feature corresponding to the missing value is used as the second type of feature. If the second type of feature is the feature to be displayed, the second abnormal SHAP value corresponding to the missing value is determined, and the second abnormal SHAP value is mapped to the preset mapping range outside the outlier upper threshold corresponding to the second type of feature to obtain the normalized data. For example, assuming that the outlier upper threshold is 12, and the value range of all the SHAP values is 0 to 100, the preset mapping range can be selected by the user between 0 and 12.
[0106] Step S42, re-arranging the limited range data to establish a mapping relationship between each of the sample features and each of the SHAP values, obtaining the data to be displayed, and displaying the data to be displayed.
[0107] In this embodiment, it should be noted that the limited range data corresponds to one or more features to be displayed.
[0108] The limited range data is reorganized to establish a mapping relationship between each of the sample features and each of the SHAP values, to obtain data to be displayed, and the data to be displayed is displayed. Specifically, the limited range data is reorganized to establish a mapping relationship between a plurality of sample feature values to be displayed and a plurality of SHAP values corresponding to each of the features to be displayed, to obtain data to be displayed, wherein the data to be displayed includes a plurality of sample feature values to be displayed, a plurality of SHAP values, and a mapping relationship between a plurality of sample feature values to be displayed and a plurality of SHAP values corresponding to each of the features to be displayed, wherein the sample feature values to be displayed correspond to the corresponding SHAP values one-to-one.
[0109] Wherein, in step S42, the sample feature includes a first sample feature and a second sample feature, and the step of displaying the data to be displayed includes:
[0110] Step S421, establishing a model explanation scatter plot corresponding to the first sample feature based on the data to be displayed;
[0111] In this embodiment, based on the data to be displayed, a model explanation scatter plot corresponding to the first sample feature is established. Specifically, based on the mapping relationship, a model explanation scatter plot corresponding to each sample feature is established with the multiple SHAP values as the vertical axis and the multiple sample feature values as the horizontal axis.
[0112] Step S422: coloring each scatter point in the model explanation scatter plot based on each sample feature value corresponding to the second sample feature, and displaying the colored model explanation scatter plot.
[0113] In this embodiment, based on each sample feature value corresponding to the second sample feature, each scatter point in the model explanation scatter plot is colored, and the colored model explanation scatter plot is displayed. Specifically, multiple sample feature values corresponding to the second sample feature are obtained, and based on the size of the multiple sample feature values corresponding to the second sample feature, each scatter point in the model explanation scatter plot is colored with different shades of color to obtain the colored model explanation scatter plot, that is, to obtain the visualization data, such as Figure 3 The figure shows a schematic diagram of the model explanation scatter plot before coloring, wherein the horizontal axis corresponds to the first sample feature, the left vertical axis corresponds to the SHAP value, there is a mapping relationship between the horizontal axis value corresponding to each scatter point and the left vertical axis value, the right vertical axis corresponds to the second sample feature, and each scatter point can be colored based on the value of the right vertical axis, and glucose is the sample feature.
[0114] This embodiment performs post-processing on each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and displays the post-processed sample features and the SHAP result. That is, after calculating the SHAP result, by post-processing the sample features, wherein the data to be explained corresponds to one or more of the sample features, the influence of the abnormal points in the data to be explained on the SHAP result can be removed, so that the explanation of the global model based on SHAP is more intuitive, that is, the SHAP result and the sample features can be displayed more intuitively, thereby avoiding the situation where the explanation effect of the global model based on SHAP is poor due to the presence of abnormal points in the data to be explained, improving the explanation effect of the model based on SHAP, and also more intuitively showing the role of the SHAP feature attribution method in improving the efficiency of model explanation, so as to lay a foundation for solving the technical problem of low efficiency of model explanation based on SHAP.
[0115] Further, refer to Figure 4Based on the first embodiment and the second embodiment of the present application, in another embodiment of the SHAP feature attribution method, the SHAP feature attribution method is applied to the execution end, and the SHAP feature attribution method includes:
[0116] Step A10, receiving the data to be interpreted and the model to be interpreted sent by the driver end associated with the execution end, and selecting a model input sample set from the data to be interpreted;
[0117] In this embodiment, it should be noted that the data to be interpreted corresponds to one or more sample features, the model input sample set includes one or more model input elements, and the model input elements include one or more first type elements and one or more second type elements.
[0118] Receive the data to be interpreted and the model to be interpreted sent by the driver end associated with the execution end, and select a model input sample set from the data to be interpreted. Specifically, receive the data to be interpreted and the model to be interpreted sent by the driver end associated with the execution end, and select a target feature from each of the sample features corresponding to the data to be interpreted, eliminate the data corresponding to the target feature from the data to be interpreted, obtain the eliminated data set to be interpreted, and select a subset from the eliminated data set to be interpreted as one of the first type elements, and add the target feature to the first type element to obtain one of the second type elements, until all the eliminated subsets of the data set to be interpreted have been selected, and re-select the target feature from each of the sample features to obtain the first type element and the second type element, until all the sample features have been selected as the target feature, wherein it should be noted that each subset of the eliminated data set to be interpreted and each target feature are selected only once.
[0119] Wherein, in step A10, the data to be explained corresponds to one or more sample features, the model input sample set includes one or more model input elements, and the model input elements include one or more first type elements and one or more second type elements.
[0120] The step of selecting a model input sample set from the data to be explained comprises:
[0121] Step A11, selecting a target feature from each of the sample features, and removing the target feature from the data to be interpreted to obtain a removal data set, and selecting one of the first type elements from the removal data set, wherein the first type element is a subset of the removal data set;
[0122] In this embodiment, it should be noted that each of the sample features is selected only once as the target feature, each subset of the eliminated data set is selected only once as one of the first type elements, and if it is necessary to perform a global interpretation of each of the sample features based on the model to be interpreted, then the first type element is the data set to be interpreted after elimination, that is, the first type element is the eliminated data set.
[0123] Step A12, adding the target feature to the first type element to obtain one of the second type elements;
[0124] In this embodiment, the target feature is added to the first type element to obtain one of the second type elements. Specifically, the target feature is incorporated into the first type element corresponding to the target feature to obtain one of the second type elements.
[0125] Step A13: reselect the target feature from the sample features to obtain other first-type elements and other second-type elements, until the target feature does not exist in the data to be interpreted, thereby obtaining the model input sample set.
[0126] In this embodiment, it should be noted that if a sample feature has been selected as the target feature, the selected sample feature can no longer be used as the target feature, and the selected subset of the elimination data set can no longer be used as one of the first type elements.
[0127] Reselect the target feature from the sample features to obtain other first-type elements and other second-type elements, until the target feature does not exist in the data to be interpreted, and obtain the model input sample set. Specifically, repeat steps A11 to A12 until the first-type elements and the second-type elements can no longer be selected from the eliminated data set, and obtain the model input sample set.
[0128] Step A20, respectively inputting each element in the model input sample set into the model to be explained, obtaining a model output result set, and obtaining an expected value of annotated labels corresponding to each sample feature in the data to be explained based on the model output result set;
[0129] In this embodiment, it should be noted that the data to be interpreted includes one or more samples to be interpreted, and the samples to be interpreted include one or more sample features, and in each sample to be interpreted, each sample feature corresponds to a sample feature value.
[0130] Input each element in the model input sample set into the model to be explained respectively to obtain a model output result set, and based on the model output result set, obtain the expected value of the annotation label corresponding to each sample feature in the data to be explained. Specifically, input each element in the model input sample set into the model to be explained respectively to perform model prediction on the data to be explained, obtain the output result of the model to be explained on each element in the model input sample set, and obtain the model output result set, wherein the model output result includes the overall output result of inputting all the data to be explained into the model to be explained, and then based on the overall output result, calculate the expectation of the model output result to obtain the expected value of the annotation label. For example, assuming that the data to be explained includes 10,000 model input values, wherein the model output value corresponding to 9,999 model input values is 1, and the model output value corresponding to the remaining model input value is 0, then the expected value of the annotation label is 0.9999.
[0131] Step A30, based on the model output result set, calculate the marginal benefit expectations corresponding to each of the sample features in parallel through the preset marginal benefit expectation calculation formula, and feed back the labeled label expectation value and each marginal benefit expectation to the driving end, so that the driving end can calculate the SHAP result corresponding to the data to be explained, and display the SHAP result.
[0132] In this embodiment, the model output result set includes output result elements, and the output result elements include a first type output result element and a second type output result element, wherein the first type output result element is the model output result corresponding to the first type element, and the second type output result element is the model output result corresponding to the second type element, wherein the second type element is obtained by combining the corresponding first type element and the target feature.
[0133] Based on the model output result set, the marginal benefit expectations corresponding to each of the sample features are calculated in parallel through a preset marginal benefit expectation calculation formula, and the annotated label expected value and each marginal benefit expectation are fed back to the driving end, so that the driving end can calculate the SHAP result corresponding to the data to be explained, and display the SHAP result. Specifically, the output result elements in the model output result set are respectively substituted into the preset marginal benefit expectation calculation formula to calculate the marginal benefit expectations corresponding to each of the sample features in parallel, and the annotated label expected value and each marginal benefit expectation are fed back to the driving end, so that the driving end can calculate the SHAP result corresponding to each of the sample features based on the annotated label expected value and each marginal benefit expectation through a preset SHAP result calculation formula, and convert the SHAP result into visual data, and display the visual data on a preset visual interface, wherein the visual data includes a model scatter plot, a line chart, etc.
[0134] This embodiment receives the data to be interpreted and the model to be interpreted sent by the driving end associated with the execution end, selects a model input sample set from the data to be interpreted, and then inputs each element in the model input sample set into the model to be interpreted to obtain a model output result set, and based on the model output result set, obtains the expected value of the annotation label corresponding to each sample feature in the data to be interpreted, and then based on the model output result set, calculates the marginal benefit expectations corresponding to each sample feature in parallel through a preset marginal benefit expectation calculation formula, and feeds back the annotation label expected value and each marginal benefit expectation to the driving end, so that the driving end can calculate the SHAP result corresponding to the data to be interpreted, and display the SHAP result. That is, this embodiment provides a method for parallel calculation of the expected marginal benefits corresponding to each of the sample features, that is, after receiving the data to be explained and the model to be explained, by selecting the model input sample set, and inputting the model output sample set into the model to be explained, a model output result set is obtained, and then based on the model output result, the annotation label expected value can be calculated, and each output result element in the model output result is input into a preset marginal benefit expected formula, so as to calculate the marginal benefit expectation corresponding to each of the sample features, and then the annotation label expected value and each marginal benefit expectation are fed back to the driving end, which lays a foundation for the driving end to calculate the SHAP result, and then lays a foundation for the driving end to display the SHAP result, so as to lay a foundation for solving the technical problem of low efficiency of model interpretation based on SHAP.
[0135] Reference Figure 5 , Figure 5 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0136] like Figure 5 As shown, the SHAP feature attribution device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0137] Optionally, the SHAP feature attribution device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0138] Those skilled in the art will understand that Figure 5 The SHAP feature attribution device structure shown in the figure does not constitute a limitation on the SHAP feature attribution device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0139] like Figure 5 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a SHAP feature attribution program. The operating system is a program that manages and controls the hardware and software resources of the SHAP feature attribution device, and supports the operation of the SHAP feature attribution program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the SHAP feature attribution system.
[0140] exist Figure 5 In the SHAP feature attribution device shown, the processor 1001 is used to execute the SHAP feature attribution program stored in the memory 1005 to implement the steps of any of the above-mentioned SHAP feature attribution methods.
[0141] The specific implementation of the SHAP feature attribution device of the present application is basically the same as the above-mentioned embodiments of the SHAP feature attribution method, and will not be repeated here.
[0142] The embodiment of the present application further provides a SHAP feature attribution device, which is applied to a driver end and includes:
[0143] An acquisition module, used for acquiring data to be interpreted, and distributing the data to be interpreted to an execution end associated with the driving end;
[0144] A parallel computing module, used for broadcasting a preset model to be explained to the execution end, so that the execution end can parallelly calculate the expected marginal benefit and the expected value of the annotation label corresponding to each sample feature in the data to be explained based on the model to be explained;
[0145] A receiving module is used to receive the marginal benefit expectations and the expected values of the annotation labels fed back by the execution end, and calculate the SHAP results corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels.
[0146] Optionally, the receiving module includes:
[0147] The acquisition unit is used to generate an input data table corresponding to each of the marginal benefit expectations, and substitute the input data table and the expected value of the annotation label into a preset SHAP result calculation formula, and calculate the SHAP results corresponding to each of the features in parallel.
[0148] Optionally, the SHAP feature attribution device further includes:
[0149] The post-processing display module is used to perform post-processing on each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and to display the post-processed sample features and the SHAP result.
[0150] Optionally, the post-processing display module includes:
[0151] A range clamping processing unit, used for performing the range clamping processing on the sample feature to obtain limited range data;
[0152] A display unit is used to rearrange the limited range data to establish a mapping relationship between each sample feature and each SHAP value, obtain data to be displayed, and display the data to be displayed.
[0153] Optionally, the display unit includes:
[0154] Establishing a subunit, used for establishing a model explanation scatter plot corresponding to the first sample feature based on the data to be displayed;
[0155] A coloring subunit is used to color each scatter point in the model explanation scatter plot based on each sample feature value corresponding to the second sample feature, and to display the colored model explanation scatter plot.
[0156] Optionally, the range clamp processing unit includes:
[0157] A first mapping subunit is used to determine a first type of feature corresponding to the missing value in the data to be explained, and map the missing value to an outlier threshold edge range corresponding to the first type of feature;
[0158] The second mapping subunit is used to determine the second type of feature corresponding to the outlier in the data to be explained, and map the outlier to outside the outlier upper threshold range corresponding to the second type of feature to obtain the limited range data.
[0159] The specific implementation of the SHAP feature attribution device of the present application is basically the same as the above-mentioned embodiments of the SHAP feature attribution method, and will not be repeated here.
[0160] To achieve the above-mentioned purpose, the embodiment of the present application further provides a SHAP feature attribution device, which is applied to an execution end and includes:
[0161] A receiving module, configured to receive the data to be interpreted and the model to be interpreted sent by the driver end associated with the execution end, and select a model input sample set from the data to be interpreted;
[0162] A model prediction module, used for inputting each element in the model input sample set into the model to be explained, obtaining a model output result set, and obtaining an expected value of a label corresponding to each sample feature in the data to be explained based on the model output result set;
[0163] A feedback module is used to calculate the marginal benefit expectations corresponding to each of the sample features in parallel based on the set of model output results, by using a preset marginal benefit expectation calculation formula, and to feed back the annotation label expectation value and each marginal benefit expectation to the driver end, so that the driver end can calculate the SHAP result corresponding to the data to be explained, and display the SHAP result.
[0164] Optionally, the receiving module includes:
[0165] A rejection unit, configured to select a target feature from each of the sample features, reject the target feature from the data to be interpreted, obtain a rejection data set, and select one of the first type elements from the rejection data set, wherein the first type element is a subset of the rejection data set;
[0166] A union unit, configured to add the target feature to the first type element to obtain one of the second type elements;
[0167] A selection unit is used for reselecting the target feature from the sample features to obtain other elements of the first type and other elements of the second type, until the target feature does not exist in the data to be interpreted, thereby obtaining the model input sample set.
[0168] The specific implementation of the SHAP feature attribution device of the present application is basically the same as the above-mentioned embodiments of the SHAP feature attribution method, and will not be repeated here.
[0169] An embodiment of the present application provides a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned SHAP feature attribution methods.
[0170] The specific implementation of the readable storage medium of the present application is basically the same as the above-mentioned embodiments of the SHAP feature attribution method, and will not be repeated here.
[0171] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A SHAP feature attribution method, characterized in that: The SHAP feature attribution method is applied to the driver end, and the SHAP feature attribution method includes: Acquire the data to be interpreted, and distribute the data to be interpreted to the execution end associated with the driving end; wherein, in the business scenario, extract the data to be interpreted from a preset local database, the data to be interpreted includes one or more samples to be interpreted, the samples to be interpreted include one or more sample features, and each sample feature corresponds to a sample feature value; the data to be interpreted is input to the execution end in a table or matrix form, each row of the table or matrix is a sample to be interpreted, and each column is a sample feature value corresponding to each sample feature in each sample to be interpreted; Broadcasting the preset model to be explained to the execution end, so that the execution end can parallelly calculate the expected marginal benefit and the expected value of the annotation label corresponding to each sample feature in the data to be explained based on the model to be explained; Receive the marginal benefit expectations and the expected values of the annotation labels fed back by the execution end, and calculate the SHAP results corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels, post-process the sample features to remove the interference of the abnormal points corresponding to the sample features on the SHAP results, and display the sample features and the SHAP results after post-processing; Among them, if the marginal benefit expectations fed back by the execution end are not in the preset table form, each marginal benefit expectation is converted into a corresponding table to obtain an input data table corresponding to each marginal benefit expectation, and the input data table and the expected value of the marked label are input into the execution unit corresponding to the preset SHAP result calculation formula, and parallel calculation of each SHAP value is performed to obtain a SHAP value table corresponding to each SHAP value, and the SHAP result is obtained.
2. The SHAP feature attribution method according to claim 1, characterized in that: The step of calculating the SHAP result corresponding to the data to be explained based on the marginal benefit expectations and the expected values of the annotation labels includes: An input data table corresponding to each of the marginal benefit expectations is determined, and the input data table and the expected value of the annotation label are substituted into a preset SHAP result calculation formula, and the SHAP results corresponding to each of the features are calculated in parallel.
3. The SHAP feature attribution method according to claim 1, characterized in that: The SHAP result includes one or more SHAP values, and the post-processing includes range clamping and re-arranging. The step of post-processing each of the sample features to remove the interference of the abnormal points corresponding to each of the sample features on the SHAP result, and displaying the post-processed sample features and the SHAP result includes: Performing the range clamping process on the sample features to obtain limited range data; The limited range data is rearranged to establish a mapping relationship between each of the sample features and each of the SHAP values, to obtain the data to be displayed, and to display the data to be displayed.
4. The SHAP feature attribution method according to claim 3, characterized in that: The sample features include a first sample feature and a second sample feature. The step of displaying the data to be displayed comprises: Based on the data to be displayed, establishing a model explanation scatter plot corresponding to the first sample feature; Based on the sample feature values corresponding to the second sample feature, each scatter point in the model explanation scatter plot is colored, and the colored model explanation scatter plot is displayed.
5. The SHAP feature attribution method according to claim 3, characterized in that: The abnormal points include missing values and outliers. The step of performing the range clamping process on the sample feature to obtain limited range data comprises: Determine a first type of feature corresponding to the missing value in the data to be explained, and map the missing value to an outlier threshold edge range corresponding to the first type of feature; Determine a second type of feature corresponding to the outlier in the data to be explained, and map the outlier to a value outside a threshold range of the outlier corresponding to the second type of feature to obtain the limited range data.
6. A SHAP feature attribution method, characterized in that: The SHAP feature attribution method is applied to the execution end, and the SHAP feature attribution method includes: Receive the data to be interpreted and the model to be interpreted sent by the driver end associated with the execution end, and select a model input sample set from the data to be interpreted; wherein, the driver end extracts the data to be interpreted from a preset local database in a business scenario, the data to be interpreted includes one or more samples to be interpreted, the samples to be interpreted include one or more sample features, each of the sample features corresponds to a sample feature value, the driver end inputs the data to be interpreted to the execution end in a table form or a matrix form, each row of the table or matrix is a sample to be interpreted, and each column is a sample feature value corresponding to each sample feature in each sample to be interpreted; Inputting each element in the model input sample set into the model to be explained respectively to obtain a model output result set, and based on the model output result set, obtaining an expected value of annotated labels corresponding to each sample feature in the data to be explained; Based on the model output result set, the marginal benefit expectations corresponding to each of the sample features are calculated in parallel through a preset marginal benefit expectation calculation formula, and the annotated label expected value and each marginal benefit expectation are fed back to the driver end so that the driver end can calculate the SHAP result corresponding to the data to be explained, and display the SHAP result. If the driver end determines that each marginal benefit expectation is not in a preset table form, each marginal benefit expectation is converted into a corresponding table to obtain an input data table corresponding to each marginal benefit expectation, and the input data table and the annotated label expected value are input into the execution unit corresponding to the preset SHAP result calculation formula, and parallel calculation of each SHAP value is performed to obtain a SHAP value table corresponding to each SHAP value, and the SHAP result is obtained.
7. The SHAP feature attribution method according to claim 6, characterized in that: The model input sample set includes one or more model input elements, and the model input elements include one or more first type elements and one or more second type elements. Selecting a target feature from each of the sample features, and removing the target feature from the data to be interpreted to obtain a removed data set, and selecting one of the first type elements from the removed data set, wherein the first type element is a subset of the removed data set; Adding the target feature to the first type element to obtain one of the second type elements; The target feature is reselected from the sample features to obtain other elements of the first type and other elements of the second type, until the target feature does not exist in the data to be interpreted, thereby obtaining the model input sample set.
8. A SHAP feature attribution device, characterized in that: The SHAP feature attribution device includes: a memory, a processor, and a program stored in the memory for implementing the SHAP feature attribution method. The memory is used to store a program for implementing the SHAP feature attribution method; The processor is used to execute a program for implementing the SHAP feature attribution method to implement the steps of the SHAP feature attribution method as described in any one of claims 1 to 5 or 6 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores a program for implementing the SHAP feature attribution method, and the program for implementing the SHAP feature attribution method is executed by a processor to implement the steps of the SHAP feature attribution method as described in any one of claims 1 to 5 or 6 to 7.
