| make_folds | R Documentation |
Generates a list of folds for a variety of cross-validation schemes.
make_folds( n = NULL, fold_fun = folds_vfold, cluster_ids = NULL, strata_ids = NULL, ... )
n |
- either an integer indicating the number of observations to
cross-validate over, or an object from which to guess the number of
observations; can also be computed from |
fold_fun |
- A function indicating the cross-validation scheme to use.
See |
cluster_ids |
- a vector of cluster ids. Clusters are treated as a unit – that is, all observations within a cluster are placed in either the training or validation set. |
strata_ids |
- a vector of strata ids. Strata are balanced: insofar as possible the distribution in the sample should be the same as the distribution in the training and validation sets. |
... |
other arguments to be passed to |
A list of folds objects. Each fold consists of a list with a
training index vector, a validation index vector, and a
fold_index (its order in the list of folds).
Other fold generation functions:
fold_from_foldvec(),
fold_funs,
folds2foldvec(),
make_repeated_folds()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.