View source: R/create_folds_and_data_split.R
DataSplit | R Documentation |
partition of data (train-test-split)
DataSplit(y, TrainRatio = 0.75, regression = TRUE, shuffle = FALSE, seed = 1)
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 |
a list of indices (train-test)
## Not run: data(iris) y = X[, 1] split = DataSplit(y, TrainRatio = 0.75, regression = FALSE, shuffle = FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.