Repeated resampling methods

repeated_resampling(
  y,
  method,
  REPEATS = 1,
  sample_rate = NULL,
  FOLDS = NULL,
  seed = 1
)

Arguments

y

the response variable (continuous or factor)

method

one of 'bootstrap', 'train_test_split', 'cross_validation'

REPEATS

the number of times that the method should be repeated

sample_rate

train-data-sample-rate for 'bootstrap' and 'train_test_split'

FOLDS

the number of folds for the 'cross_validation' method

seed

an integer specifying the RNG

Value

a list of sublist(s)

Details

This function is meant for splitting the data using three resampling methods, with the option of multiple repeats.

Examples

if (FALSE) { data(Boston, package = 'MASS') y = Boston$medv res = repeated_resampling(y, 'bootstrap', REPEATS = 2, sample_rate = 0.75, FOLDS = NULL) }