partition of data (train-test-split)

DataSplit(y, TrainRatio = 0.75, regression = TRUE, shuffle = FALSE, seed = 1)

Arguments

y

is a numeric vector (response variable)

TrainRatio

is the percentage of train-data after the partition

regression

is a boolean (TRUE, FALSE) indicating if it's a regression or classification task

shuffle

is a boolean (TRUE, FALSE) indicating if the data should be shuffled or not (by default 5 times)

seed

an integer specifying the random seed

Value

a list of indices (train-test)

Examples

if (FALSE) { data(iris) y = X[, 1] split = DataSplit(y, TrainRatio = 0.75, regression = FALSE, shuffle = FALSE) }