koalaverse/vip

Add Shapley-based importance

bgreenwell opened this issue · 3 comments

Use fastshap for Shapley-based feature importance. Future versions of fastshap will utilize TreeSHAP for fast results when applied to certain models like xgboost and lightgbm.

Should we have a vi_shap method that allows both fast shap and also tree shap methods? Meaning, it can leverage both fastshap and also allow xgboost's (and any other models) that have built-in shapley computations (shortcut to this).

My thought is that fastshap will just default to using TreeSHAP in the next release so we’d just use that (consistent) interface! But yes, I like the idea of vi_shap() as the workhorse underneath. Ideally it would just call fastshap::explain(tree_mod, exact = TRUE, ...) or something to that effect.

TODO:

  • - Add initial support.
  • - Update vignettes for website.
  • - Update R Journal article.