Internal function that creates fold assignments for k-fold cross-validation, with support for repeated cross-validation.
createFolds(n, n_folds, n_repeats = 1)
A list of length n_repeats
. Each element contains a list of
n_folds
integer vectors representing the indices (0-based)
of observations in each fold.
Integer. Number of observations to split into folds.
Integer. Number of folds to create.
Integer. Number of times to repeat the cross-validation process with different fold assignments. Default is 1.