class_folds: stratified folds (in classification)

View source: R/create_folds_and_data_split.R

class_foldsR Documentation

stratified folds (in classification)

Description

this function creates stratified folds in binary and multiclass classification

Usage

class_folds(folds, RESP, shuffle = FALSE)

Arguments

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

Value

a list of indices

Examples


## Not run: 

data(iris)

y = as.factor(iris[, 5])

folds = class_folds(10, y, shuffle = TRUE)

## End(Not run)

mlampros/FeatureSelection documentation built on Jan. 12, 2023, 4:40 a.m.