Description Usage Arguments Value Examples
It creates stratified (cross-)validation folds from data according to formula, so that all levels of all factors in formula
are as balancely scattered as possible.
This avoids problem with simple un-stratified cross validation where a factor level presents only in the validation set but not in the training set.
1 |
form |
A |
data |
Data. |
k |
number of folds to form. |
valid_prob |
Percentage of data to appear in validation set. Only used in |
A numeric vector with entries indicating the fold it belongs to.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.