varImpPlot {randomForest} | R Documentation |
Variable Importance Plot
Description
Dotchart of variable importance as measured by a Random Forest
Usage
varImpPlot(x, sort=TRUE, n.var=min(30, nrow(x$importance)),
type=NULL, class=NULL, scale=TRUE,
main=deparse(substitute(x)), ...)
Arguments
x |
An object of class |
sort |
Should the variables be sorted in decreasing order of importance? |
n.var |
How many variables to show? (Ignored if
|
type , class , scale |
arguments to be passed on to
|
main |
plot title. |
... |
Other graphical parameters to be passed on to
|
Value
Invisibly, the importance of the variables that were plotted.
Author(s)
Andy Liaw andy_liaw@merck.com
See Also
Examples
set.seed(4543)
data(mtcars)
mtcars.rf <- randomForest(mpg ~ ., data=mtcars, ntree=1000, keep.forest=FALSE,
importance=TRUE)
varImpPlot(mtcars.rf)
[Package randomForest version 4.7-1.1 Index]