confuTab: Compute confusion tables for a confusion matrix.

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a n by n confusion matrix, the function returns a list of n 2 by 2 tables with false positives, false negatives, false positives and true negative for each initial variables.

Usage

1
confuTab(obj, naAs0. = FALSE)

Arguments

obj

An instance of class table. Must be square.

naAs0.

A logical, defining if NAs are to be replaced by 0s.

Value

A list of length nrow(obj) and names rownames(obj).

Author(s)

Laurent Gatto <lg390@cam.ac.uk>

See Also

The tp, tn, fp, fn, methods to extract the respective classification outcomes from a contingency matrix.

Examples

1
2
3
4
## the confusion matrix
cm <- table(iris$Species, sample(iris$Species))
## the 3 confusion tables
(ct <- confuTab(cm))

lgatto/MLInterfaces documentation built on May 21, 2019, 5:12 a.m.