Classification measure defined as $$ \frac{1}{n} \sum_{i=1}^n \left( t_i \neq r_i \right). $$

ce(truth, response, ...)

truth | :: |
---|---|

response | :: |

... | :: |

Performance value as `numeric(1)`

.

Type:

`"classif"`

Range: \([0, 1]\)

Minimize:

`TRUE`

Required prediction:

`response`

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)#> [1] 0.8