powered by
Plot distribution of votes for each sample in each class.
plotVotes(rf, type = NULL, plot = TRUE)
an object inheriting from randomForest.
randomForest
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.
area
bar
display the plot?
the ggplot2 object is invisibly returned.
ggplot2
# NOT RUN { data(mtcars) rf <- randomForest(factor(am) ~ ., mtcars) plotVotes(rf) # }
Run the code above in your browser using DataLab