View source: R/deepSelection.r
data_split | R Documentation |
Split data into two pieces, usually train and test pieces.
data_split(.data, ...)
## Default S3 method:
data_split(
.data,
test_size = 0.25,
train_size = 0.75,
random_state = NULL,
shuffle = TRUE,
axis = 1
)
## S3 method for class 'array'
data_split(
.data,
test_size = 0.25,
train_size = 0.75,
random_state = NULL,
shuffle = TRUE,
axis = 1
)
## S3 method for class 'data.frame'
data_split(
.data,
test_size = 0.25,
train_size = 0.75,
random_state = NULL,
shuffle = TRUE
)
## S3 method for class 'factor'
data_split(
.data,
test_size = 0.25,
train_size = 0.75,
random_state = NULL,
shuffle = TRUE
)
.data |
Data to be split. |
test_size |
An integer or float value between 0.0 and 1.0 representing the absolute number of test samples (integer) or the proportion of the data to include in the test split (float).
If |
train_size |
An integer or float value between 0.0 and 1.0 representing the absolute number of train samples (integer) or the proportion of the data to include in the train split (float).
If |
random_state |
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. |
axis |
The axis along to split. Default is the first axis. |
List containing data pieces.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.