create.folds | R Documentation |
Create a list of indices corresponding to cross-validation folds.
create.folds(num.folds, num.rows, seed = NULL)
num.folds |
Number of folds to be created. |
num.rows |
Number of observations in the dataset. |
seed |
Seed of the random number generator. If |
A list of length num.folds
containing the indices of the observations
to be withdrawn for validation in each fold.
Note that the number of observations withdrawn in each fold may not be
exactly the same if num.folds
is not an integer divisor of num.rows
.
all.folds <- create.folds(50, 307, 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.