Description Usage Arguments Value Examples
View source: R/train_test_split.R
Training and testing set split
1 | train_test_split(data, var = "date", train.window, test.window)
|
data |
A data frame to be splitted. |
var |
The column name for dates. |
test.window |
A nummric vetor of testing set starting time, and ending time |
trian.window |
A nummric vetor of training set starting time, and ending time |
A list of training set and testing set
1 2 | data(tickets)
train_test_split(tickets, var = "date", train.window = c(20140701, 20180630), test.window = c(20180701, 20190630))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.