% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cv_uncertainty.R
\name{cv_ci}
\alias{cv_ci}
\title{Confidence intervals for cross-validated metrics}
\usage{
cv_ci(
  metrics_df,
  level = 0.95,
  method = c("normal", "nadeau_bengio"),
  n_train = NULL,
  n_test = NULL
)
}
\arguments{
\item{metrics_df}{Data.frame with columns \code{fold}, \code{learner}, and
one or more numeric metric columns.}

\item{level}{Confidence level (default 0.95).}

\item{method}{One of \code{"normal"} or \code{"nadeau_bengio"}.}

\item{n_train}{Average number of training samples per fold. Used only when
\code{method = "nadeau_bengio"}. NULL to use fallback variance.}

\item{n_test}{Average number of test samples per fold. Used only when
\code{method = "nadeau_bengio"}. NULL to use fallback variance.}
}
\value{
A data.frame with \code{learner} and, for each metric, columns
  \code{<metric>_mean}, \code{<metric>_sd}, \code{<metric>_ci_lo}, and
  \code{<metric>_ci_hi}.
}
\description{
Computes per-learner confidence intervals for each metric column in a
per-fold metrics data.frame. Supports the standard normal/t approach and the
Nadeau-Bengio (2003) corrected variance for repeated K-fold CV.
}
