% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metrics.R
\name{tl_cv}
\alias{tl_cv}
\title{Cross-validation for tidylearn models}
\usage{
tl_cv(data, formula, method, folds = 5, ...)
}
\arguments{
\item{data}{Data frame}

\item{formula}{Model formula}

\item{method}{Modeling method}

\item{folds}{Number of cross-validation folds}

\item{...}{Additional arguments}
}
\value{
A list with two elements:
\describe{
\item{\code{$folds}}{A list of per-fold evaluation
\link[tibble]{tibble}s, each with \code{metric} and
\code{value} columns.}
\item{\code{$summary}}{A \link[tibble]{tibble} with columns
\code{metric}, \code{mean}, and \code{sd} summarizing
performance across folds.}
}
}
\description{
Cross-validation for tidylearn models
}
\examples{
\donttest{
cv <- tl_cv(mtcars, mpg ~ wt + hp, method = "linear", folds = 3)
cv$summary
}
}
