View source: R/pipeline_modules.R
assignTrainingFolds | R Documentation |
Assigns each row in the input data a fold number randomly while ensuring the same number of cases/controls are assigned to each fold.
assignTrainingFolds(data, classColname, nFolds, pipelineRunInformation)
data |
A matrix/data.frame with a column named <class.colname> corresponding to a binary indicator of case/control. |
classColname |
The name of the column corresponding to a binary indicator of case/control. |
nFolds |
The number of folds to be assigned. |
pipelineRunInformation |
The object originally created by
|
A vector with elements corresponding to rows in data. Each element is
a number between 1-nFolds
and represents which cross-validation fold
the row is assigned to.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.