createFolds {fgga} | R 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 GO 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)

[Package fgga version 1.2.0 Index]