Learn R Programming

classyfire (version 0.1-2)

getAvgAcc: Get the average accuracies of a classification ensemble

Description

The avgTestAcc function returns the average test accuracy (%CC) and average train accuracy of an ensemble of classifiers as generated by the function cfBuild.

Usage

getAvgAcc(ensObj)

Arguments

ensObj
The classification ensemble (in the form of an R list) as generated by cfBuild

Value

The avgTestAcc function returns a list with two named (Test and Train) numerical values, equal to the average overall test accuracy (%CC) and the average overall train accuracy of the ensemble. The attributes of the list can be accessed by executing the attributes command.

See Also

getAcc

Examples

Run this code
## Not run: 
# data(iris)
# 
# irisClass <- iris[,5]
# irisData  <- iris[,-5]
# 
# ens <- cfBuild(inputData = irisData, inputClass = irisClass, bootNum = 100, 
#                ensNum = 100, parallel = TRUE, cpus = 4, type = "SOCK")
# 
# # Get the attributes provided by the getAvgAcc function
# attributes(getAvgAcc(ens))
# 
# # Get the average test and train accuracies within the ensemble
# getAvgAcc(ens)
# 
# # Get the average test accuracy 
# getAvgAcc(ens)$Test
# 
# # Get the average train accuracy
# getAvgAcc(ens)$Train
# ## End(Not run)

Run the code above in your browser using DataLab