For V-fold type cross-validation. This takes a fold vector (validation set IDs) and builds a fold object for fold V.

fold_from_foldvec(v, folds)

Arguments

v

An identifier of the fold in which observations fall for cross-validation.

folds

A vector of the fold status for each observation for cross-validation.

See also

Other fold generation functions: fold_funs, folds2foldvec(), make_folds(), make_repeated_folds()