% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Classification.R
\name{ZeroOneLoss}
\alias{ZeroOneLoss}
\title{Normalized Zero-One Loss (Classification Error Loss)}
\usage{
ZeroOneLoss(y_pred, y_true)
}
\arguments{
\item{y_pred}{Predicted labels vector, as returned by a classifier}

\item{y_true}{Ground truth (correct) 0-1 labels vector}
}
\value{
Zero-One Loss
}
\description{
Compute the normalized zero-one classification loss.
}
\examples{
data(cars)
logreg <- glm(formula = vs ~ hp + wt,
              family = binomial(link = "logit"), data = mtcars)
pred <- ifelse(logreg$fitted.values < 0.5, 0, 1)
ZeroOneLoss(y_pred = pred, y_true = mtcars$vs)
}

