Statistics Glossary → SHAP values
SHAP valuesconcept
A measure, based on Shapley values from game theory, that explains each individual prediction of a machine-learning model as the sum of the contributions of the variables.
SHAP (SHapley Additive exPlanations) decomposes a prediction as follows: prediction = base value (the average prediction over the data) + the SHAP value of each variable. A variable's SHAP value is the weighted average of the change it causes in the prediction when added to every possible subset of the other variables; this corresponds to Shapley's game-theoretic method for fairly sharing out a player's average contribution to a team. A positive SHAP value pushes the prediction up and a negative one pushes it down. For tree-based models (such as XGBoost), the TreeSHAP algorithm computes these values exactly and quickly.
The mean absolute SHAP value across all observations gives a variable's overall importance to the model and yields a more consistent ranking than permutation importance or impurity reduction. SHAP values explain the model's behaviour, however, not causal effects in the real world, and how credit is shared among correlated variables can depend on the approach used. The values are on the scale of the model's output: in classification this is often the log-odds scale rather than probability.
An everyday example
A bank's model predicts a 25% risk of default for a loan application, while the average risk over all applications is 10%. The SHAP explanation might show that the 15-point gap is made up as follows: low income +12, short employment history +6, a regular payment record -3. The contributions add up exactly to the difference between the average and this application.
In MerQur
It is offered in Gradient Boosting through the 'SHAP' option as mean |SHAP| variable contributions from the XGBoost engine; it is not produced with the GradientBoosting engine.
Analyses where this concept appears
Related concepts
Variable importance (gain, cover, frequency)Partial dependence plot