`interpret_models` is a wrapper function for extracting feature importances from multiple fitted models that were trained using caret, tidymodels, or h2o backends. This wrapper function provides uniformity of input arguments to easily switch between the different modeling packages.

interpret_models(fit_list, options = list(), use = NULL)

Arguments

fit_list

List of fitted models for which to make predictions. Typically the output of `fit_models()`.

options

Named list of additional arguments to pass to `varImp()` if using caret backend, `h2o.varimp()` if using h2o backend, or `vip::vi()` if using tidymodels backend. If different arguments need to be passed in for different fitted models, `options` should be a list where each element is named after the model (i.e., the same name as in `fit_list`) and is a list of named arguments. If `options` is not a list of list, then all list elements are passed to the predict function for every model.

use

One of "caret", "h2o", "tidymodels", indicating the modeling package to use. If NULL (default), the modeling package is inferred from the fit.

Value

A tibble with the following columns:

Method

Name of method that made the associated feature importance.

Variable

Name of feature/variable.

Importance

Feature importance score.

See also

Other interpret_models_family: interpret_model