View source: R/dotplot.varImp.train.R
| dotPlot | R Documentation |
A lattice lattice::dotplot() is created from an object of class
varImp.train.
dotPlot(x, top = min(20, dim(x$importance)[1]), ...)
x |
an object of class |
top |
the number of predictors to plot |
... |
options passed to |
an object of class trellis.
Max Kuhn
varImp(), lattice::dotplot()
data(iris)
TrainData <- iris[, 1:4]
TrainClasses <- iris[, 5]
knnFit <- train(TrainData, TrainClasses, "knn")
knnImp <- varImp(knnFit)
dotPlot(knnImp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.