Description Usage Arguments Details Value Author(s) References See Also Examples
The function generate.cv
generates randomly m
groups for m
-fold cross-validation.
1 | generate.cv(n,m)
|
n |
The total number of observations in the data set. |
m |
The desired number of groups. |
Leave-one-out cross-validation is a special case of cross-validation, with m
=n
.
A m
x ceiling(n
/m
) matrix giving the indices of the observations included in each
group. The i-th row gives the indices of observations included in the i-th group. If the m
groups are not perfectly equally sized, the last column includes one or several zero(s).
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.split
,wilcox.split
,wilcox.selection.split
1 2 3 4 5 | # load WilcoxCV library
library(WilcoxCV)
# Generate 10 groups for a data set of size 95.
my.cv<-generate.cv(n=95,m=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.