Calculates the per-observation 0/1 loss as $$
t_i \neq r_1.
$$

Measure to compare true observed labels with predicted
labels
in multiclass classification tasks.

Note that this is an unaggregated measure, returning the losses per observation.

## Usage

`zero_one(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(length(truth))`

.

Type: `"classif"`

Range (per observation): \([0, 1]\)

Minimize (per observation): `TRUE`

Required prediction: `response`