cvsplit: Cross-Validation Splitting

Description Usage Arguments Value Examples

Description

This function shuffles the observations of a dataset, splits it into k-folds and produces a list of the training sets and a list of the validation sets. Furthermore

Usage

1
cvsplit(train = NULL, folds = 10)

Arguments

train

The dataset you wish to split.

folds

The amount of folds you wish to produce. Note the amount of observations divided by folds must equal a whole number.

Value

trainlist

A list of the training sets

vallist

A list of the validation sets

Examples

1
2
data(iris)
cv_lists <- cvsplit(iris)

Dynge/r_dynge documentation built on July 1, 2019, 11:21 p.m.