View source: R/MultiLambdaCVfun.R
CVfolds | R Documentation |
Creates (repeated) cross-validation folds for samples
CVfolds(Y, model = NULL, balance = TRUE, kfold = 10, fixedfolds = TRUE, nrepeat = 1)
Y |
Response vector: numeric, binary, factor or |
model |
Character. Any of |
balance |
Boolean. Should the splits be balanced in terms of response labels? |
kfold |
Integer. Desired fold. |
fixedfolds |
Boolean. Should fixed splits be used for reproducibility? |
nrepeat |
Numeric. Number of repeats. |
Creates (repeated), possibly balanced, splits of the samples. Computing time will often largely depend on
on kfold*nrepeat
, the number of training-test splits evaluated.
List object with kfold*nrepeat
elements containing the sample indices of the left-out samples per split.
A full demo and data are available from:
https://drive.google.com/open?id=1NUfeOtN8-KZ8A2HZzveG506nBwgW64e4
data(dataXXmirmeth) resp <- dataXXmirmeth[[1]] leftout <- CVfolds(Y=resp,kfold=10,nrepeat=3,fixedfolds = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.