ce: Classification Error

Description Usage Arguments Value Meta Information See Also Examples

View source: R/classif_ce.R

Description

Classification measure defined as

mean(t != r).

Usage

1
ce(truth, response, ...)

Arguments

truth

:: factor()
True (observed) labels. Must have the same levels and length as response.

response

:: factor()
Predicted response labels. Must have the same levels and length as truth.

...

:: any
Additional arguments. Currently ignored.

Value

Performance value as numeric(1).

Meta Information

See Also

Other Classification Measures: acc, bacc, logloss

Examples

1
2
3
4
5
set.seed(1)
lvls = c("a", "b", "c")
truth = factor(sample(lvls, 10, replace = TRUE), levels = lvls)
response = factor(sample(lvls, 10, replace = TRUE), levels = lvls)
ce(truth, response)

mlr3measures documentation built on Nov. 5, 2019, 9:06 a.m.