plot.randomForest

0th

Percentile

Plot method for randomForest objects

Plot the error rates or MSE of a randomForest object

Keywords
regression, classif, tree
Usage
# S3 method for randomForest
plot(x, type="l", main=deparse(substitute(x)), ...)
Arguments
x

an object of class randomForest.

type

type of plot.

main

main title of the plot.

...

other graphical parameters.

Value

Invisibly, the error rates or MSE of the randomForest object. If the object has a non-null test component, then the returned object is a matrix where the first column is the out-of-bag estimate of error, and the second column is for the test set.

Note

This function does not work for randomForest objects that have type=unsupervised.

If the x has a non-null test component, then the test set errors are also plotted.

See Also

randomForest

Aliases
  • plot.randomForest
Examples
# NOT RUN {
data(mtcars)
plot(randomForest(mpg ~ ., mtcars, keep.forest=FALSE, ntree=100), log="y")
# }
Documentation reproduced from package randomForest, version 4.6-14, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.