Learn R Programming

rfPermute (version 2.5.2)

plotTrace: Plot Trace

Description

Plot trace of cumulative OOB (classification) or MSE (regression) error rate by number of trees.

Usage

plotTrace(x, pct.correct = TRUE, plot = TRUE)

Value

the ggplot2 object is invisibly returned.

Arguments

x

a rfPermute or randomForest model object.

pct.correct

display y-axis as percent correctly classified (TRUE) or OOB error rate (FALSE).

plot

display the plot?

Author

Eric Archer eric.archer@noaa.gov

Examples

Run this code
library(randomForest)
data(mtcars)

rf <- randomForest(factor(am) ~ ., mtcars)
plotTrace(rf)

Run the code above in your browser using DataLab