getAcc: Get the accuracies of a classification ensemble

Description Usage Arguments Value See Also Examples

View source: R/stats.R

Description

The getAcc function returns the test and train accuracies for all the classifiers within a classification ensemble as generated by cfBuild.

Usage

1
getAcc(ensObj)

Arguments

ensObj

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

Value

The getAcc function returns a list with two named (Test and Train) vectors, equal to the overall test accuracies (%CC) and overall train accuracies of the classifiers within the ensemble. The attributes of the list can be accessed by executing the attributes command.

See Also

getAvgAcc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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 getAcc function
attributes(getAcc(ens))

# Get both the vectors of test and train accuracies from the classifiers in the ensemble
getAcc(ens)

# Get the vector of test accuracies from the classifiers in the ensemble
getAcc(ens)$Test

# Get the vector of train accuracies from the classifiers in the ensemble
getAcc(ens)$Train

## End(Not run)

classyfire documentation built on May 29, 2017, 11:05 p.m.