Description Usage Arguments Value Examples
View source: R/train_valid_test_split.R
train_valid_test_split Splits feature and target data frames into random train, validation and test subsets The proportion of the train set relative to the input data will be valid_size * (1 - test_size)
1 2 | train_valid_test_split(x, y, test_size = 0.25, valid_size = 0.25,
shuffle = TRUE, random_state = NULL)
|
x |
(data frame) Original features from data set |
y |
(data frame) Original labels from data set |
test_size |
(double, default = NULL) Value between 0.0 and 1.0 to represent the proportion of the dataset to comprise the size of the test subset |
valid_size |
float or None (default = 0.25) Value between 0.0 and 1.0 to represent the proportion of the dataset to comprise the size of the test subset |
shuffle |
(default = TRUE) Shuffle the rows or not |
random_state |
(int, default = NULL) Seed for the random number generator |
list
1 2 3 4 5 6 7 8 9 10 11 12 | x = data.frame('X1'=c(0,1,2,3,4,5,6,7),
'X2'=c(8,9,10,11,12,13,14,15))
y = data.frame('Y'=c(0,1,2,3,4,5,6,7))
train_valid_test_split(x,y)$x_train
train_valid_test_split(x,y)$x_valid
train_valid_test_split(x,y)$x_test
train_valid_test_split(x,y)$y_train
train_valid_test_split(x,y)$y_valid
train_valid_test_split(x,y)$y_test
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.