Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

varImpPlot

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 RRF.

sort

Should the variables be sorted in decreasing order of importance?

n.var

How many variables to show? (Ignored if sort=FALSE.)

type, class, scale

arguments to be passed on to importance

main

plot title.

...

Other graphical parameters to be passed on to dotchart.

Value

Invisibly, the importance of the variables that were plotted.

Author(s)

See Also

Examples

set.seed(4543)
data(mtcars)
mtcars.rf <- RRF(mpg ~ ., data=mtcars, ntree=1000, keep.forest=FALSE,
                          importance=TRUE)
varImpPlot(mtcars.rf)

RRF

Regularized Random Forest

v1.9.1
GPL (>= 2)
Authors
Fortran original by Leo Breiman and Adele Cutler, R port by Andy Liaw and Matthew Wiener, Regularized random forest for classification by Houtao Deng. Regularized random forest for regression by Xin Guan.
Initial release
2018-07-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.