multisample {crtests} | R Documentation |
Make multiple samples of data
cross_fold
: Make 'folds' samples of the data, so all(rbind(folds)==row.names(data))=TRUE
random
: Makes iterations
random samples of size holdout * nrow(data)
multisample.cross_fold(data, folds = 10, dependent,
preserve_distribution = FALSE)
multisample.random(data, holdout = 0.2, iterations = 10, dependent,
preserve_distribution = FALSE)
data |
Data to sample |
folds |
Number of folds to create |
dependent |
The dependent variable in the data. Used only if |
preserve_distribution |
Logical, only applicable if the dependent variable is a factor |
holdout |
The fraction of data to be used as holdout set |
iterations |
Number of iterations to make |
A list of numeric vectors of length 'folds'