SHAP-based variable importance
Compute SHAP-based VI scores for the predictors in a model. See details below.
vi_shap(object, ...) ## Default S3 method: vi_shap(object, feature_names = NULL, train = NULL, ...)
object |
A fitted model object (e.g., a |
... |
Additional optional arguments to be passed on to
|
feature_names |
Character string giving the names of the predictor
variables (i.e., features) of interest. If |
train |
A matrix-like R object (e.g., a data frame or matrix)
containing the training data. If |
This approach to computing VI scores is based on the mean absolute value of the SHAP values for each feature; see, for example, https://github.com/slundberg/shap and the references therein.
Strumbelj, E., and Kononenko, I. Explaining prediction models and individual predictions with feature contributions. Knowledge and information systems 41.3 (2014): 647-665.
A tidy data frame (i.e., a "tibble"
object) with two columns,
Variable
and Importance
, containing the variable name and its
associated importance score, respectively.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.