Learn R Programming

D2MCS (version 1.0.1)

ConfMatrix: Confusion matrix wrapper.

Description

Creates a R6 confusion matrix from the confusionMatrix caret package.

Arguments

Methods


Method new()

Method to create a confusion matrix object from a caret confusionMatrix

Usage

ConfMatrix$new(confMatrix)

Arguments

confMatrix

A caret confusionMatrix argument.


Method getConfusionMatrix()

The function obtains the confusionMatrix following the same structured as defined in the caret package

Usage

ConfMatrix$getConfusionMatrix()

Returns

A confusionMatrix object.


Method getTP()

The function is used to compute the number of True Positive values achieved.

Usage

ConfMatrix$getTP()

Returns

A numeric vector of size 1.


Method getTN()

The function computes the True Negative values.

Usage

ConfMatrix$getTN()

Returns

A numeric vector of size 1.


Method getFN()

The function returns the number of Type II errors (False Negative).

Usage

ConfMatrix$getFN()

Returns

A numeric vector of size 1.


Method getFP()

The function returns the number of Type I errors (False Negative).

Usage

ConfMatrix$getFP()

Returns

A numeric vector of size 1.


Method clone()

The objects of this class are cloneable with this method.

Usage

ConfMatrix$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

D2MCS, MeasureFunction, ClassificationOutput