powered by
this function creates stratified folds for cross validation.
cv_split(dat, k = 5, occur_time = NULL, seed = 46)
A data.frame.
k is an integer specifying the number of folds.
time variable for creating OOT folds. Default is NULL.
A seed. Default is 46.
a list of indices
# NOT RUN { sub = cv_split(UCICreditCard, k = 30)[[1]] dat = UCICreditCard[sub,] # }
Run the code above in your browser using DataLab