kfold {nnlasso} | R Documentation |
k-fold partition of data at random
Description
The function partitions a data set into k folds of equal sizes at random.
Usage
kfold(data1,k)
Arguments
data1 |
A matrix. |
k |
Number of folds |
Details
This function is internal and used by cross validation routines.
Value
A matrix with fold identification in first column.
Author(s)
Baidya Nath Mandal and Jun Ma
Examples
data=matrix(rnorm(10*4),10,4)
kfold(data,3)
[Package nnlasso version 0.3 Index]