make_folds | R Documentation |
Helper function for making fold IDs for cross validation.
make_folds(nsamp, nfold, cv_fold_seed)
nsamp |
Number of samples. |
nfold |
Number of cross validation folds. |
cv_fold_seed |
Seed for random shuffling. |
A list of nsamp
vectors, numbers 1 to nsamp
shuffled and grouped into vectors of length floor(nsamp/nfold)
followed by vectors of length floor(nsamp/nfold)+1
.
make_folds(37, 5, NULL)
make_folds(100, 5, 2)
make_folds(100, 10, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.