cv_split {creditmodel}R Documentation

Stratified Folds

Description

this function creates stratified folds for cross validation.

Usage

cv_split(dat, k = 5, occur_time = NULL, seed = 46)

Arguments

dat

A data.frame.

k

k is an integer specifying the number of folds.

occur_time

time variable for creating OOT folds. Default is NULL.

seed

A seed. Default is 46.

Value

a list of indices

Examples

sub = cv_split(UCICreditCard, k = 30)[[1]]
dat = UCICreditCard[sub,]

[Package creditmodel version 1.3.1 Index]