getConfMatr: Confusion matrix summarising the performance of an ensemble

Description Usage Arguments Note Examples

View source: R/stats.R

Description

The getConfMatr function returns a confusion matrix from an ensemble created by cfBuild. The matrix is populated using class predictions for test data, predictions which were obtained during the building and optimisation of the classifier. Each column of the confusion matrix represents the instances in a predicted class, while each row represents the instances in an actual class. Cells in the matrix indicate the percentage of samples predicted to belong to each class. In a perfect ensemble the diagonal elements would all be 100%.

Usage

1
getConfMatr(ensObj)

Arguments

ensObj

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

Note

A graphical representation of this information is provided by ggClassPred.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
data(iris)

irisClass <- iris[,5]
irisData  <- iris[,-5]
            
ens <- cfBuild(irisData, irisClass, bootNum = 100, ensNum = 100, parallel = TRUE, 
               cpus = 4, type = "SOCK")

# Get the confusion matrix summarising the performance of the ensemble
getConfMatr(ens)

## End(Not run)

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