% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_split_plan.R
\name{check_split_overlap}
\alias{check_split_overlap}
\title{Check split overlap invariants}
\usage{
check_split_overlap(splits, coldata = NULL, cols = NULL, stop_on_fail = TRUE)
}
\arguments{
\item{splits}{A \code{LeakSplits} object from \code{\link{make_split_plan}}.}

\item{coldata}{A data.frame of sample metadata. When \code{NULL} (default),
the function uses \code{splits@info$coldata} if available.}

\item{cols}{Character vector of column names to check for overlap. When
\code{NULL} (default), the function infers columns from the split mode
(e.g., \code{group} for \code{subject_grouped}, \code{batch} for
\code{batch_blocked}, both axes for \code{combined}).}

\item{stop_on_fail}{Logical; if \code{TRUE} (default), raises an error when
any overlap is detected.}
}
\value{
A data.frame with one row per fold-by-column combination and
  columns \code{fold}, \code{repeat_id}, \code{col}, \code{n_overlap}
  (number of overlapping group values), and \code{pass} (logical).
  Invisible. Raises an error if any fold fails and \code{stop_on_fail = TRUE}.
}
\description{
Verifies that a \code{\linkS4class{LeakSplits}} object satisfies the
expected no-overlap constraints for one or more grouping columns. For each
fold, the function checks that no group-level value appearing in the test
set is also present in the training set.
}
