Is there a difference between feature effect (eg SHAP effect) and feature importance in machine learning terminologies?
2 Answers
In A Unified Approach to Interpreting Model Predictions the authors define SHAP values "as a unified measure of feature importance". That is, SHAP values are one of many approaches to estimate feature importance.
This e-book provides a good explanation, too:
The goal of SHAP is to explain the prediction of an instance x by computing the contribution of each feature to the prediction. [...] SHAP feature importance is an alternative to permutation feature importance. There is a big difference between both importance measures: Permutation feature importance is based on the decrease in model performance. SHAP is based on magnitude of feature attributions.
-
2$\begingroup$ Aren't these two feature importances somehow related? I mean if a feature has a very high impact on the model's performance then it should also have very high magnitude of feature attribution. $\endgroup$ Commented Jan 19, 2023 at 15:52
SHAP values estimate the impact of a feature on predictions whereas feature importances estimate the impact of a feature on model fit.
-
1$\begingroup$ "SHAP values estimate the impact of a feature on predictions whereas feature importances estimate the impact of a feature on model fit." I don't think this is generally correct but potentially if you restrict the second part of your statement to certain measures of feature importance, such as linear coefficients in LR or impurity gains in RFs (if they are not out-of-bag). $\endgroup$– JonathanCommented Aug 3, 2021 at 15:38
-
$\begingroup$ @Jonathan how are SHAP values in light of feature_importances of a tree based model say like xgboost $\endgroup$ Commented Oct 21, 2022 at 13:44