christophM / interpretable-ml-book

Book about interpretable machine learning
https://christophm.github.io/interpretable-ml-book/
Other
4.73k stars 1.05k forks source link

Formula for SHAP Feature Importance #292

Closed JEwerszumrode closed 2 years ago

JEwerszumrode commented 2 years ago

In 8.6.5 you describe the feature importance as the mean of the abs shapley values, but you define it as a sum of the shapley values: I_j = \sum_{i=1}^{n} |\phi_j^{(i)}|. I think it should be: I_j = 1/n \sum_{i=1}^{n} |\phi_j^{(i)}|

christophM commented 2 years ago

Thanks, it should be the mean.