What does a SHAP (SHapley Additive exPlanations) value represent for a specific feature in a prediction?
Select an answer to reveal the explanation.
Short Explanation and Infographic
SHAP values answer 'why did the model say this?' for each prediction — a positive SHAP value for a feature means that feature pushed the prediction higher; negative means it pushed it lower.
Full explanation below image
Full Explanation
SHAP (SHapley Additive exPlanations) is a game-theory-based method for explaining individual predictions. For a single prediction: SHAP value for feature i = the contribution of feature i to (prediction - base value), where base value = E[f(X)] = average prediction across training data. Properties: 1) Additivity — the sum of all SHAP values equals the prediction minus the base value: Σ SHAP_i = f(x) - E[f(X)]. 2) Consistency — if a feature contributes more in any coalition, its SHAP value is higher. 3) Feature attribution — a positive SHAP value means the feature pushed the prediction above baseline; negative means it reduced it. On Databricks: the SHAP library works natively, and mlflow.shap.log_explanation() logs SHAP values as MLflow artifacts. Tree-based models use TreeExplainer (fast, exact); other models use KernelExplainer (slow, approximate).