Description Usage Arguments Value See Also Examples
View source: R/find.division.not.strat.R
Function to determine a random partition of the input vector into a specifiend number of folds.
1 | 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.
1 2 3 4 5 6 7 | 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]];
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.