stratified_crossvalidation_folds {GROAN} | R Documentation |
Assignments for stratified crossvalidation
Description
This function creates the assignments to perform a stratified crossvalidation. It requires, for each element of the set, a label describing the strata it belongs to. It also requires the number of folds.
Usage
stratified_crossvalidation_folds(strata, folds.num)
Arguments
strata |
an array of strata (will be treated as a factor) |
folds.num |
the number of folds |
Details
A warning is triggered if the number of folds is greater than the number of elements of any stratum.
Value
an array, same length as strata
, of numbers in the 1:folds.num
set
[Package GROAN version 1.3.1 Index]