These functions represent different cross-validation schemes that can be used with origami.
They should be used as options for the fold_fun argument to the make_folds
function in this package. make_folds will call the requested function specify n,
based on its arguments, and pass any remaining arguments (e.g. V or pvalidation) on.
folds_vfold(n, V = 10)folds_resubstitution(n)
folds_loo(n)
folds_montecarlo(n, V = 1000, pvalidation = 0.2)
folds_bootstrap(n, V = 1000)
folds_rolling_origin(n, first_window, validation_size, gap = 0, batch = 1)
folds_rolling_window(n, window_size, validation_size, gap = 0, batch = 1)
(integer) - number of observations.
(integer) - number of folds.
(double) - proportion of observation to be in validation fold.
(integer) - number of observations in the first training sample.
(integer) - number of points in the validation samples; should be equal to the largest forecast horizon.
(integer) - number of points not included in the training or validation samples; Default is 0.
(integer) - Increases the number of time-points added to the training set each CV iteration. Applicable for larger time-series. Default is 1.
(integer) - number of observations in each training sample.
A list of Folds.
Other fold generation functions: fold_from_foldvec,
make_folds,
make_repeated_folds