With fold_group = NULL, assigns clips within each site x species,
reproducing the original fold assignment. For grouped folds, give one
or more column names, e.g. "source_audio" for recordings or "night"
for nights. Site is always part of the grouping key. All species and
clips sharing that key go into the same fold; groups are shuffled and
distributed among folds within site, balancing group counts rather
than clip counts. Each site must have at least k_folds groups.
Arguments
- validations
Calibration data including
site,speciesand any columns named infold_group. Useread_validations(keep = )to retain metadata from validation files.- k_folds
Integer number of folds, at least two.
- seed
Seed of the assignment; the caller's random state is restored.
- fold_group
Optional character vector of grouping columns. Do not include
species, verdicts or confidence scores: these would split recordings or nights by species or by outcome. Group IDs must be nonmissing and nonempty.NULLkeeps the original clip folds.