rfPermute (version 2.1.81)

plotInbag: Plot inbag distribution

Description

Plot distribution of sample inbag rates

Usage

plotInbag(rf, sampsize = NULL, bins = 20, plot = TRUE)

Arguments

rf

an object inheriting from randomForest.

sampsize

optional vector of sample sizes used in rf model.

bins

number of bins in histogram.

plot

display the plot?

Value

the ggplot2 object is invisibly returned. The red vertical lines mark the expected values for the classes in the model based on their frequency and sample sizes.

Examples

Run this code
# NOT RUN {
data(mtcars)

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

# }

Run the code above in your browser using DataCamp Workspace