Misclassification loss (source code)

= Misclassification loss
{title2=$\ell_{0-1}$}

= Zero-one loss
{synonym}

For a <classifier> $h$ and a labelled example $z=(x,y)$, the misclassification loss is
$$
\ell_{0-1}(h,z)=\mathbf1_{\{h(x)\ne y\}}.
$$
It is also called zero-one loss because it is zero for a correct prediction and one for an incorrect prediction.