Recursively create training set indices ensuring class representation in every bootstrap resample

Usage,
boot_train(data, class, n, stratify = FALSE)

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 of class to ensure the bootstrap sample contains the same proportions of each strata as the original data.