createFolds: Data splitting function useful for binary classification...

View source: R/createFolds.R

createFoldsR Documentation

Data splitting function useful for binary classification tasks

Description

createFolds splits binary classification data into k-folds.

Usage

createFolds(target, k_fold = 10)

Arguments

target

A binary vector of a Ontology class

k_fold

An integer for the number of folds

Details

A random sampling is performed on binary classification data. A set of k data folds reflecting the original class balance is obtained.

Value

list of row position integers corresponding to the training data

Author(s)

Flavio E. Spetale and Pilar Bulacio <spetale@cifasis-conicet.gov.ar>

References

Hyndman and Athanasopoulos (2013), Forecasting: principles and practice. https://www.otexts.org/fpp

Examples

data(CfData)

createFolds(CfData[["tableCfGO"]][ ,"GO:0005515"], k_fold = 2)

fspetale/fgga documentation built on Jan. 29, 2024, 6:53 p.m.