Description Usage Arguments Value See Also Examples
Splitting dataset into training and testing is a job done before every moedel training So this function does exactly that
1 | test_train_split(data, train_size = 0.8, seed = 1, shuffle = FALSE)
|
data |
Dataframes,Arrays,Vectors |
train_size |
Numeric (should be between 0.0 and 1.0). Represent the proportion of the dataset to include in the test split. |
seed |
Controls the shuffling applied to the data before applying the split. Pass an int for reproducible output across multiple function calls. |
shuffle |
Whether or not to shuffle the data before splitting. Default is set to FALSE |
List containing train-test split of inputs.
base::gsub()
which this function wraps.
1 2 | test_train_split(mtcars)
test_train_split(mtcars, train_size=0.75, seed=101, shuffle=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.