balancedCvFolds: Create balanced folds for cross validation using stratified...

View source: R/balanced_data.R

balancedCvFoldsR Documentation

Create balanced folds for cross validation using stratified sampling

Description

Create balanced folds for cross validation using stratified sampling

Usage

balancedCvFolds(..., nfolds = 10)

# deprecated, please use balancedCvFolds()
balanced.cv.folds(..., nfolds = 10)

Arguments

...

vectors representing data

nfolds

number of folds to be created

Value

list with given input, nfolds and result. The result is a list matching the input with foldid attributed to each position.

Examples

balancedCvFolds(seq(10), seq(11, 15), nfolds = 2)

# will give a warning
balancedCvFolds(seq(10), seq(11, 13), nfolds = 10)

balancedCvFolds(seq(100), seq(101, 133), nfolds = 10)

sysbiomed/glmSparseNet documentation built on Feb. 17, 2024, 1:38 p.m.