this function creates both stratified and non-stratified folds in regression

regr_folds(folds, RESP, stratified = FALSE)

Arguments

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

Value

a list of indices

Examples

if (FALSE) { data(iris) y = X[, 1] folds = regr_folds(5, y, stratified = FALSE) }