Description Usage Arguments Value Examples
View source: R/stratify_sample.R
Generates cross validation folds in a stratified way.
1 2 | stratifySample(data, targetVariable, nfolds = 5, uniqueID = NULL,
keepData = FALSE, positiveResponse = 1, seed = NULL)
|
data |
A |
targetVariable |
A |
nfolds |
An integer giving the number of cross validation folds. |
uniqueID |
A |
keepData |
A Boolean indicating whether or not to keep the entire dataset along with extra columns indicating the folds. |
positiveResponse |
The value of the target variable which indicates a positive response. Must be 1 or 0. |
seed |
The seed value to use to reproduce results. |
An object of the class StratifiedXValS3
.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.