train_test_split | R Documentation |
Train-test split by person, so that no person shows up in both the training and test set. Note that test_size refers to the number/percentage of _people_, not of _rows_.
train_test_split(df, test_size, combine = FALSE)
df |
(data.frame) NEBCS data |
test_size |
(number) Float between 0 and 1 indicating a percentage of the data to use as the test set, or integer indicating the number of rows to use as the test set. |
combine |
(bool) (default=FALSE) Whether or not to combine the training and test sets with test set marked as 'validation == 1'. |
(list<data.frame>) Training set, test set, optionally combined set.
tts_df_list = get_case_cntl(df) tts_df_list$train tts_df_list$test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.