varimp_table: Variable importance as one table

View source: R/200_Supervised.R

varimp_tableR Documentation

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)

Arguments

x

VariableImportance object, as returned by get_varimp.

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>"]].

Value

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

Author(s)

EDG

Examples

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

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.