I'm attempting to use SHAP to automatically extract feature names that have a positive impact on my regression models. On inspection of the code I see that the bar plot, for example, determines these by taking the mean absolute SHAP values for a feature. Being an absolute value, it obviously takes the absolute impact but I want to only consider positive impacting values.

Is my intuition that I can just take the mean instead of the mean of the absolute values correct? (highly) Negative SHAP values should give a negative mean value.

Is this a good approach or am I missing some better way to do this?

EDIT: I am specifically interested in features that raise the predicted value. ie. if feature_1 lifts the predicted value by 100 and feature_2 by 1000, I want this information to be extracted as feature_2 has and higher impact on the output value.


1 Answer 1


Depending on your model there may be some better model-specific approaches than SHAP. It is also important to note that SHAP is an approximation of Shapley value, with the main assumption of not having too much correlation between your features.

That being said, taking the mean instead of the mean absolute values seems to be the most efficient approach in the continuity of what you are doing. Just keep in mind that :

  • SHAP don't have a "physical" interpretation, in terms of direct impact on the output. It may lack some meaning for real life users.

  • Taking the mean can "hide" skewed SHAP profile : a variable with high impact on a small subgroup of instances and no impact on the rest may get the same average than a variable with small impact on every instance.

  • $\begingroup$ Good points you make. I guess at this stage I need impact, although not "physical" impact. But with that point, is there a method to actually determine that? $\endgroup$ Apr 29, 2020 at 11:19
  • $\begingroup$ It depends both on your model and your calibration process (mainly your learning objective). In logistic regression for exemple, you can work with log-odds, they are additive and can be reworked to reflect change in the overall probability. You can have similar things with trees, where you can affect an impact when you go down the tree. As you can guess, this only works if the overall score has a real meaning (i.e. you have a proper scoring metric and thus your model is calibrated in probabilities). $\endgroup$ Apr 29, 2020 at 12:30
  • $\begingroup$ @lcrmorin May I have your input for my post kindly. $\endgroup$
    – Mario
    Feb 17, 2021 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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