FpFnInv: FpFnInv

Description Usage Arguments Value Author(s) Examples

Description

Count false positive, false negative, and inversions. Each of these is considered an error. Both the real labels and the predictions should be in c(-1,0,1).

Usage

1
FpFnInv(true, pred)

Arguments

true

Actual labels.

pred

Model predictions.

Value

data.frame with 1 row and 5 columns: false.positive, false.negative, inversion, error, count.

Author(s)

Toby Dylan Hocking

Examples

1
2
3
4
5
6
7
8
values <- c(-1,0,1)
x <- expand.grid(true=values, pred=values)
(err <- FpFnInv(x$true, x$pred))
stopifnot(err$err == 6)
stopifnot(err$false.positive == 2)
stopifnot(err$false.negative == 2)
stopifnot(err$inversion == 2)
stopifnot(err$count == nrow(x))

tdhock/rankSVMcompare documentation built on May 31, 2019, 7:38 a.m.