Learn R Programming

classyfire (version 0.1-2)

ggEnsHist: Ensemble Histograms

Description

The ggEnsHist function generates a histogram of the ensemble results as generated by cfBuild.

Usage

ggEnsHist(ensObj, density = FALSE, percentiles = FALSE, mean = FALSE, median = FALSE)

Arguments

ensObj
The classification ensemble (in the form of an R list) as generated by cfBuild
density
Boolean value, by default equal to FALSE. If density = FALSE, the histogram depicts frequencies, the counts component of the result. Instead, for density = TRUE, probability densities are plotted.
percentiles
Boolean value, by default equal to FALSE. If percentiles = TRUE, the upper and lower percentiles of the distribution are depicted in the plot.
mean
Boolean value, by default equal to FALSE. If mean = TRUE, the mean of the distribution is depicted in the plot.
median
Boolean value, by default equal to FALSE. If median = TRUE, the median of the distribution is depicted in the plot.

See Also

ggPermHist

Examples

Run this code
## Not run: 
# data(iris)
# 
# irisClass <- iris[,5]
# irisData  <- iris[,-5]
# 
# ens <- cfBuild(irisData, irisClass, bootNum = 100, ensNum = 100, parallel = TRUE, 
#                cpus = 4, type = "SOCK")
# 
# # Basic histogram of the test accuracies in the ensemble
# ggEnsHist(ens)
# 
# # Density plot of the test accuracies in the ensemble
# ggEnsHist(ens, density = TRUE)
# 
# # Density plot that highlights additional descriptive statistics
# ggEnsHist(ens, density = TRUE, percentiles=TRUE)
# ggEnsHist(ens, density = TRUE, percentiles=TRUE, mean=TRUE)
# ggEnsHist(ens, density = TRUE, percentiles=TRUE, median=TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab