Learn R Programming

rtemis (version 1.4.3)

get_varimp: Get variable importance

Description

The variable importance measures a fitted model reports, or the mean absolute contribution of each predictor in a SHAP explanation.

Usage

get_varimp(x, ...)

Value

VariableImportance object, a list of them (one per resample) for a SupervisedRes, or NULL when the algorithm reports no importance.

Arguments

x

Supervised, SupervisedRes or SHAP object.

...

Additional arguments passed to methods.

Author

EDG

Details

A VariableImportance object holds its measures by name in @measures. Each measure states what it quantifies (@kind, for example split gain, permutation, or coefficient), the cases it was computed on (@computed_on), whether its values can be negative (@signed) or depend on the units of the predictors (@scale_dependent), how it ranks predictors (@direction), and what its values are for this model (@description); @values holds the value for each predictor. varimp_table combines the measures into one data.frame.

Examples

Run this code
mod <- train(iris, hyperparameters = setup_LightRF())
get_varimp(mod)

Run the code above in your browser using DataLab