kfold_xval {structToolbox} | R Documentation

## kfold_xval model class

### Description

Applies k-fold crossvalidation to a model or model_seq()

### Usage

    kfold_xval(folds = 10, method = "venetian", factor_name, ...)

### Arguments

`folds` | The number of cross-validation folds
`method` | The method for selecting samples in each fold. Can be one of "venetian", "blocks" or "random". Default is "venetian".
`factor_name` | The sample_meta column name to use.
`...` | additional slots and values passed to struct_class

### Value

struct object

### Examples

    D = iris_DatasetExperiment()
    I = kfold_xval(factor_name='Species') *
        (mean_centre() + PLSDA(factor_name='Species'))
    I = run(I,D,balanced_accuracy())

[Package structToolbox version 0.99.8 Index]