While through the various resources online to understand the shap plots, I ended up slightly confused. Find below my interpretation of the overall plot given in examples -

enter image description here

  1. Shap value 0 for a feature corresponds to the average prediction using all the other possible combinations of features except for the feature of interest. For e.g, shap value 0 for LSTAT corresponds to the average prediction of models having different combinations of features (excluding LSTAT)
  2. Shap value of 4 with respect to 0 means that there is a relative increase in prediction being 1. How do we explain shap values 4, 2, etc. with respect to 0 in layman's terms?
  3. Slight confusion in interpreting the overall graph vs the single point graph ( (enter image description here

) - In a single data point example, the base value/expected value is the average prediction in the entire dataset -> but in the overall plot (referenced at the top) we are saying it is the average prediction without that feature. So things don't add up? Thank you for your help! :)


I think your interpretation is not entirely correct. Loosely rephrasing Lundberg et al. [arXiv:1802.03888], the SHAP value of feature $i$ is $$ E[f(x) \mid S \cup \{i\}] - E[f(x) \mid S] $$ averaged over all possible subsets of features $S$, $i \notin S$. Here $f(x)$ is the prediction of the model for inputs $x$. Figure 2 from the preprint is a good illustration:

SHAP values

We are interested in the (signed) length of arrow for a particular feature, averaged over all permutations of the features. For a linear model $y(x) = w^Tx$ the SHAP value of feature $i$ would be simply $w_i x_i$.

Now to your items:

  1. SHAP value of 0 for some feature means that in the current example the value of that feature is ignored by the model. In the linear model this feature's weight would be 0.
  2. SHAP value of 4 means that the value of that feature in the current example increases the model's output by 4. Let me use your summary plot as an illustration. It was produced with Boston housing data, and we can check in the dataset that the maximal value of feature ‘RM’ (average number of rooms per house) is around 9. The plot shows that the brightest shade of red for this feature corresponds to SHAP values of around 3, 4, and 8. This means that having 9 rooms in a house tends to increase its price by 3, 4, or 8 thousand USD.
  3. The summary is just a swarm plot of SHAP values for all examples. The example whose power plot you include below corresponds to the points with $\text{SHAP}_\text{LSTAT} = 4.98$, $\text{SHAP}_\text{RM} = 6.575$, and so on in the summary plot.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.