View source: R/create_folds_and_data_split.R
regr_folds | R Documentation |
this function creates both stratified and non-stratified folds in regression
regr_folds(folds, RESP, stratified = FALSE)
folds |
is an integer specifying the number of folds |
RESP |
is the response variable |
stratified |
is a boolean specifying if the folds should be stratfied |
a list of indices
## Not run: data(iris) y = X[, 1] folds = regr_folds(5, y, stratified = FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.