% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stats_cv_sets_methods.R
\name{.balanced_bootstrap_mc}
\alias{.balanced_bootstrap_mc}
\title{Class-balanced resampling (with replacement)}
\usage{
.balanced_bootstrap_mc(
  k,
  split,
  stratified,
  remainder = c("distribute", "drop")
)
}
\arguments{
\item{k}{Integer. Number of resampling sets.}

\item{split}{Numeric in (0,1). Fraction of total N used as training size.}

\item{stratified}{List of length 3:
\enumerate{
\item type: "DA" for classification or "R" for regression
\item Y: matrix with one column (n x 1)
\item probs: numeric vector of quantile probs for regression binning (e.g. c(0, .33, .66, 1))
}}

\item{remainder}{Character. How to handle n_train \%\% G remainder:
\itemize{
\item "drop": keep perfect balance, total size becomes G * floor(n_train/G)
\item "distribute": distribute leftover 1-by-1 to random strata (still near-balanced)
}}
}
\value{
List of length k. Each element is an integer vector of training indices.
}
\description{
Generates k training index sets. Total train size per set is floor(N * split),
where N is the total number of samples. Each stratum contributes (approximately)
equally, sampling WITH replacement within each stratum.
}
\keyword{internal}
