% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metrics.R
\name{tl_calc_classification_metrics}
\alias{tl_calc_classification_metrics}
\title{Calculate classification metrics}
\usage{
tl_calc_classification_metrics(
  actuals,
  predicted,
  predicted_probs = NULL,
  metrics = c("accuracy", "precision", "recall", "f1", "auc"),
  thresholds = NULL,
  ...
)
}
\arguments{
\item{actuals}{Actual values (ground truth)}

\item{predicted}{Predicted class values}

\item{predicted_probs}{Predicted probabilities (for metrics like AUC)}

\item{metrics}{Character vector of metrics to compute}

\item{thresholds}{Optional vector of thresholds to evaluate
for threshold-dependent metrics}

\item{...}{Additional arguments}
}
\value{
A \link[tibble]{tibble} with columns \code{metric} (character)
and \code{value} (numeric) containing the requested classification
metrics. When \code{thresholds} are supplied, additional rows are
appended with threshold-specific metric names.
}
\description{
Calculate classification metrics
}
\examples{
\donttest{
model <- tl_model(iris, Species ~ ., method = "forest")
preds <- predict(model)
tl_calc_classification_metrics(iris$Species, preds$.pred)
}
}
