View source: R/train_test_balance.R
train_test_balance | R Documentation |
Balance and split the dataset
train_test_balance(
data,
y,
balance = TRUE,
fractions = c(0.6, 0.2, 0.2),
seed = NULL,
verbose = FALSE
)
data |
A data source, that is one of the major R formats: data.table, data.frame, matrix and so on. |
y |
A string that indicates a target column name. |
balance |
A logical value, determines if we want to balance the dataset. |
fractions |
A vector with 3 numeric values that sum to 1 which determine sizes of train, test and validation datasets. DEFAULT: c(0.6, 0.2, 0.2). |
seed |
An integer random seed. It allows for comparable results. If it is NULL, the split is random. |
verbose |
A logical value, if set to TRUE, provides all information about the process, if FALSE gives none. |
A list of train, test and validation datasets.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.