Learn R Programming

tornado (version 0.1.3)

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

Description

Importance Plot for the caret::train objects

Usage

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

Value

an object of type importance_plot

type

the type of importance plot

data

the importance data required for the plot

Arguments

model_final

a model object

...

arguments passed to other methods

See Also

importance

Examples

Run this code
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)
}

Run the code above in your browser using DataLab