importance: Relative Variable Importance

View source: R/importance.R

importanceR Documentation

Relative Variable Importance

Description

importance is a generic function for obtaining resampled variable importance scores. The function invokes particular methods which depend on the class of the first argument.

Usage

importance(object, ...)

## S3 method for class 'nested'
importance(object, ...)

## S3 method for class 'beset_rf'
importance(object, ...)

## S3 method for class 'part_depend'
importance(object, ...)

## S3 method for class 'variable_importance'
plot(x, p_max = 20, labels = NULL, max_import = NULL, ...)

Arguments

object

A model object for which variable importance scores are desired.

...

Additional named arguments that define the model selection rules. See summary.beset.

p_max

Maximum number of predictors to include in variable importance plot

labels

(Optional) two-column data.frame where column 1 gives the variable names used in the model and column 2 gives a corresponding descriptive label. If labels are defined, the variable importance plot will replace the model variable names with their descriptive labels.

max_import

(Optional) numeric value specifying the maximum value of the x axis for the relative importance plot. Default is the upper limit of the largest importance score

Methods (by class)

  • importance(nested): Determine variable importance for "nested" beset_glm and beset_elnet objects

  • importance(beset_rf): Relative importance method for "beset_rf" objects

  • importance(part_depend): Relative importance based on partial dependence

Examples

rf <- beset_rf(Fertility ~ ., data = swiss)
importance(rf)


jashu/beset documentation built on April 20, 2023, 5:28 a.m.