Learn R Programming

clusterGGM (version 0.1.1)

cv_folds: Create Cross-Validation Folds

Description

Obtain indices for splitting observations into \(K\) blocks to be to be folded into training and test data during \(K\)-fold cross-validation.

Usage

cv_folds(n, K = 5L)

Value

A list of indices giving the blocks of observations to be folded into training and test data during cross-validation.

Arguments

n

an integer giving the number of observations to be split.

K

an integer giving the number of blocks into which the observations should be split (the default is five).

Author

Andreas Alfons

See Also

cggm_cv()

Examples

Run this code
cv_folds(20, K = 5)

Run the code above in your browser using DataLab