Learn R Programming

caret (version 7.0-1)

dotPlot: Create a dotplot of variable importance values

Description

A lattice dotplot is created from an object of class varImp.train.

Usage

dotPlot(x, top = min(20, dim(x$importance)[1]), ...)

Value

an object of class trellis.

Arguments

x

an object of class varImp.train

top

the number of predictors to plot

...

options passed to dotplot

Author

Max Kuhn

See Also

varImp, dotplot

Examples

Run this code


data(iris)
TrainData <- iris[,1:4]
TrainClasses <- iris[,5]

knnFit <- train(TrainData, TrainClasses, "knn")

knnImp <- varImp(knnFit)

dotPlot(knnImp)


Run the code above in your browser using DataLab