Calculates the per-observation 0/1 (zero-one) loss as $$ \mathbf{1} (t_i \neq r_1). $$ The 1/0 (one-zero) loss is equal to 1 - zero-one and calculated as $$ \mathbf{1} (t_i = r_i). $$
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.
zero_one(truth, response, ...)one_zero(truth, response, ...)
Performance value as numeric(length(truth))
.
Type: "classif"
Range (per observation): \([0, 1]\)
Minimize (per observation): TRUE
Required prediction: response
Other Classification Measures:
acc()
,
bacc()
,
ce()
,
logloss()
,
mauc_aunu()
,
mbrier()
,
mcc()