Learn R Programming

classyfire (version 0.1-2)

ggEnsTrend: Trend of the test accuracies

Description

The ggEnsTrend function displays the average test accuracies for every new classifier added to the ensemble, as constructed by the cfBuild function.

Usage

ggEnsTrend(ensObj, xlabel = NULL, ylabel = NULL, showText = FALSE, xlims = NULL, ylims = NULL)

Arguments

ensObj
The R object as generated by cfBuild
xlabel
A sub title for the x axis (optional field).
ylabel
A sub title for the y axis (optional field).
showText
Boolean value, by default set to FALSE. If showText=TRUE, then the values of all test accuracies in the ensemble are displayed in the plot.
xlims
A vector of numeric values that specifies the minimum and maximum values in the x axis.
ylims
A vector of numeric values that specifies the minimum and maximum values in the y axis.

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")
# 
# # Plot the trend of the test accuracies in the ensemble
# ggEnsTrend(ens)
# 
# # Plot with text 
# ggEnsTrend(ens, showText  = TRUE)
# 
# # Plot with text; set different limits on y axis 
# ggEnsTrend(ens, showText  = TRUE, ylims=c(90, 100))
# ## End(Not run)

Run the code above in your browser using DataLab