importance.train: Importance Plot for the caret::train objects

View source: R/importance_train.R

importance.trainR Documentation

Importance Plot for the caret::train objects

Description

Importance Plot for the caret::train objects

Usage

## S3 method for class 'train'
importance(model_final, ...)

Arguments

model_final

a model object

...

arguments passed to other methods

Value

an object of type importance_plot

type

the type of importance plot

data

the importance data required for the plot

See Also

importance

Examples

if (requireNamespace("caret", quietly = TRUE) &
    requireNamespace("randomForest", quietly = TRUE))
{
  model_final <- caret::train(x = subset(mtcars, select = -mpg), y = mtcars$mpg, method = "rf")
  imp <- importance(model_final)
  plot(imp)
}

bertcarnell/tornado documentation built on Aug. 6, 2024, 10:17 p.m.