create_grouped_k_multifolds | R Documentation |
Like createMultiFolds but still splitting by groups using groupKFold. Code modified from createMultiFolds.
create_grouped_k_multifolds(groups, kfold = 10, cv_times = 5)
groups |
equivalent to y in caret::createMultiFolds |
kfold |
equivalent to k in caret::createMultiFolds |
cv_times |
equivalent to cv_times in caret::createMultiFolds |
indices of folds for CV
Zena Lapp, zenalapp@umich.edu
## Not run:
set.seed(0)
groups <- c("A", "B", "A", "B", "C", "C", "A", "A", "D")
folds <- create_grouped_k_multifolds(groups, kfold = 2, cv_times = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.