generate.split {WilcoxCV} | R Documentation |
The function generate.split
generates niter
random splittings into learning and test
data sets for use in Monte-Carlo cross-validation (MCCV).
generate.split(niter,n,ntest)
niter |
The number of iterations (number of splits into learning and split sets). |
n |
The total number of observations in the data set. |
ntest |
The number of observations in the test sets. |
This function is meant for use in Monte-Carlo cross-validation (MCCV).
A niter
x ntest
matrix giving the indices of the observations included in the
test sets. The i-th row gives the indices of the ntest
observations included in the test
set for the i-th MCCV iteration.
Anne-Laure Boulesteix (http://www.ibe.med.uni-muenchen.de/organisation/mitarbeiter/020_professuren/boulesteix/index.html)
A. L. Boulesteix (2007). WilcoxCV: an R package for fast variable selection in cross-validation. Bioinformatics 23:1702-1704.
generate.cv
,wilcox.split
,wilcox.selection.split
# load WilcoxCV library library(WilcoxCV) # Generate 50 splits with ratio 2:1 for a data set including 90 observations my.split<-generate.split(niter=50,n=90,ntest=30)