kfold: k-fold partition of data at random

Description Usage Arguments Details Value Author(s) Examples

Description

The function partitions a data set into k folds of equal sizes at random.

Usage

1
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

1
2
data=matrix(rnorm(10*4),10,4)
kfold(data,3)

nnlasso documentation built on May 2, 2019, 8:19 a.m.

Related to kfold in nnlasso...