find.division.not.strat {COSNet} | R Documentation |
Function to determine a random partition of the input vector into a specifiend number of folds.
find.division.not.strat(vett, n_fold)
vett |
vector to be partitioned |
n_fold |
number of folds in which the argument vett must be partitioned |
List with n_fold elements, the i-th element is a vector corresponding to i-th fold.
n <- 100; vett <- runif(n, 0, 1); n_fold <- 5; fold_list <- find.division.not.strat(vett, n_fold); length(fold_list); ## indices of the first fold fold_list[[1]];