powered by
A lattice dotplot is created from an object of class varImp.train.
dotplot
varImp.train
dotPlot(x, top = min(20, dim(x$importance)[1]), ...)
an object of class varImp.train
the number of predictors to plot
options passed to dotplot
an object of class trellis.
trellis
varImp, dotplot
varImp
# NOT RUN { 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