% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/splitgraph_adapter.R
\name{as_leaksplits}
\alias{as_leaksplits}
\title{Convert a splitGraph split_spec into bioLeak splits}
\usage{
as_leaksplits(spec, data, outcome, sample_id_col = "sample_id", v = 5, ...)
}
\arguments{
\item{spec}{A \code{split_spec} object from \pkg{splitGraph}.}

\item{data}{A data.frame (or SummarizedExperiment) containing at least one
identifier column matching \code{sample_id_col} and an \code{outcome}
column.}

\item{outcome}{Name of the outcome column in \code{data}.}

\item{sample_id_col}{Name of the sample-id column in \code{data}
(default \code{"sample_id"}).}

\item{v}{Number of CV folds to request from \code{make_split_plan()}.}

\item{...}{Additional arguments forwarded to \code{\link{make_split_plan}}
(e.g. \code{stratify}, \code{seed}, \code{horizon}, \code{purge}).}
}
\value{
A \code{LeakSplits} object.
}
\description{
Consume a `split_spec` produced by \pkg{splitGraph} and build a
corresponding \code{LeakSplits} object via \code{\link{make_split_plan}}.
The spec supplies the grouping/blocking/ordering assignments; the caller
supplies the observation frame (features + outcome), joined on sample id.
}
\details{
The mapping from \code{spec$constraint_mode} to
\code{make_split_plan(mode=)} is:
\itemize{
  \item \code{"subject"}   -> \code{"subject_grouped"}
  \item \code{"batch"}     -> \code{"batch_blocked"}
  \item \code{"study"}     -> \code{"study_loocv"}
  \item \code{"time"}      -> \code{"time_series"}
  \item \code{"composite"} -> \code{"combined"}
}

Blocking variables declared on the spec (\code{batch_group},
\code{study_group}) and ordering (\code{order_rank}) are forwarded
automatically when relevant.
}
\seealso{
\code{\link{make_split_plan}}, \code{\link{as_rsample}}
}
