Recursively create training set indices ensuring class representation in every bootstrap resample
Source:R/splendid_model.R
boot_train.Rd
Recursively create training set indices ensuring class representation in every bootstrap resample
Arguments
- data
data frame with rows as samples, columns as features
- class
true/reference class vector used for supervised learning
- n
number of bootstrap replicates to generate
- stratify
logical; if
TRUE
, the bootstrap resampling is performed within each strata ofclass
to ensure the bootstrap sample contains the same proportions of each strata as the original data.