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

plotVotes

Plot Vote Distribution


Description

Plot distribution of votes for each sample in each class.

Usage

plotVotes(rf, type = NULL, freq.sep.line = TRUE, plot = TRUE)

Arguments

rf

an object inheriting from randomForest.

type

either area for stacked continuous area plot or bar for discrete stacked bar chart. The latter is prefered for small numbers of cases. If not specified, a bar chart will be used if all classes have <= 30 cases.

freq.sep.line

put frequency of original group on second line in facet label? If FALSE, labels are single line. If NULL frequencies will not be included in labels.

plot

display the plot?

Value

the ggplot2 object is invisibly returned.

Author(s)

Examples

data(mtcars)

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

rfPermute

Estimate Permutation p-Values for Random Forest Importance Metrics

v2.1.81
GPL (>= 2)
Authors
Eric Archer [aut, cre]
Initial release

We don't support your browser anymore

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