% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/performance-metrics.R
\name{gazepoint_classification_metrics}
\alias{gazepoint_classification_metrics}
\title{Binary classification metrics}
\usage{
gazepoint_classification_metrics(
  truth,
  probability,
  predicted = NULL,
  positive = NULL,
  threshold = 0.5
)
}
\arguments{
\item{truth}{Observed binary outcome values.}

\item{probability}{Predicted positive-class probabilities.}

\item{predicted}{Optional predicted classes.}

\item{positive}{Label representing the positive class.}

\item{threshold}{Probability threshold used for class predictions.}
}
\value{
A one-row data frame containing the sample size, threshold, class-performance measures, discrimination metrics, Brier score, and log loss.
}
\description{
Binary classification metrics
}
\examples{
truth <- factor(
  rep(c("pass", "review"), 6),
  levels = c("pass", "review")
)
probability <- c(
  0.20, 0.70, 0.60, 0.55, 0.30, 0.80,
  0.65, 0.45, 0.40, 0.75, 0.50, 0.60
)
predicted <- factor(
  ifelse(probability >= 0.5, "review", "pass"),
  levels = levels(truth)
)
gazepoint_classification_metrics(
  truth = truth,
  probability = probability,
  predicted = predicted,
  positive = "review"
)
}
