View source: R/create_folds_and_data_split.R
class_folds | R Documentation |
this function creates stratified folds in binary and multiclass classification
class_folds(folds, RESP, shuffle = FALSE)
folds |
is an integer specifying the number of folds |
RESP |
is the response variable |
shuffle |
is a boolean specifying if the vector of indices should be shuffled or not |
a list of indices
## Not run: data(iris) y = as.factor(iris[, 5]) folds = class_folds(10, y, shuffle = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.