Learn R Programming

rtemis (version 1.4.3)

varimp_table: Variable importance as one table

Description

Combine the variable importance measures of a model into one table: one row per predictor or model term and one column per measure.

Usage

varimp_table(x)

Value

data.frame with a variable column and one numeric column per measure.

Arguments

x

VariableImportance object, as returned by get_varimp.

Author

EDG

Details

Columns follow the order of the measures. A predictor a measure does not cover is NA in that measure's column: some backends report only the predictors used in a split. A measure named variable or fold, or one repeating an earlier column, is labeled "<name> (measure)", since those column names carry the table's structure.

The table holds the values only. What each measure quantifies, the cases it was computed on, and how it ranks predictors are on the measure itself: get_varimp(model)@measures[["<name>"]].

Examples

Run this code
mod <- train(iris, hyperparameters = setup_CART(), verbosity = 0L)
varimp_table(get_varimp(mod))

Run the code above in your browser using DataLab