generate.split: Generating random splittings into learning and test data sets

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function generate.split generates niter random splittings into learning and test data sets for use in Monte-Carlo cross-validation (MCCV).

Usage

1
generate.split(niter,n,ntest)

Arguments

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.

Details

This function is meant for use in Monte-Carlo cross-validation (MCCV).

Value

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.

Author(s)

Anne-Laure Boulesteix (http://www.ibe.med.uni-muenchen.de/organisation/mitarbeiter/020_professuren/boulesteix/index.html)

References

A. L. Boulesteix (2007). WilcoxCV: an R package for fast variable selection in cross-validation. Bioinformatics 23:1702-1704.

See Also

generate.cv,wilcox.split,wilcox.selection.split

Examples

1
2
3
4
5
# 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)

WilcoxCV documentation built on May 2, 2019, 4:16 a.m.