cv_one_env_out | R Documentation |
Generates folds for the leave one environment out cross validation. In each
fold on environment is taken to be the testing set and all the remaining ones
to be the training set. It is a special case of the cv_one_group_out
where
the groups are the environments.
cv_one_env_out(envs, envs_proportion = 1, folds_per_env = 5)
envs |
( |
envs_proportion |
( |
folds_per_env |
( |
A list
with length(unique(envs)) * folds_per_env
elements where each
element is a named list
with the elements training
wich includes the
indices of those records to be part of the training set and testing
wich
includes the indices of those records to be part of the testing set.
Training and testing sets of each fold are exhaustive and mutually exclusive.
## Not run:
# Generates random data
envs <- rep(paste0("env", 1:4), 10)
folds <- cv_one_env_out(envs)
# Indices of training set in fold 1
folds[[1]]$training
# Indices of testing set in fold 1
folds[[1]]$testing
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.