% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/accessors.R
\name{fit_metrics}
\alias{fit_metrics}
\title{Per-fold metric data frame from a LeakFit}
\usage{
fit_metrics(fit)
}
\arguments{
\item{fit}{A `LeakFit` object returned by [fit_resample()].}
}
\value{
A `data.frame` with one row per (fold, repeat, learner)
  combination.
}
\description{
Returns the per-fold metric data frame stored in a `LeakFit` object.
Each row is one (fold, repeat, learner) combination; columns include
the requested metric values such as `auc` and any task-specific
performance scores.
}
\examples{
set.seed(1)
df <- data.frame(
  subject = rep(1:6, each = 2),
  outcome = factor(rep(c("a","b"), 6), levels = c("a","b")),
  x1 = rnorm(12), x2 = rnorm(12)
)
splits <- make_split_plan(df, outcome = "outcome",
                          mode = "subject_grouped", group = "subject", v = 3)
\dontrun{
  fit <- fit_resample(df, outcome = "outcome", splits = splits,
                      learner = parsnip::logistic_reg() |>
                                parsnip::set_engine("glm"),
                      metrics = "auc")
  fit_metrics(fit)
}
}
\seealso{
[fit_resample()], [audit_perm_gap()]
}
