first images of time series split
This commit is contained in:
Родитель
4cc59ac53e
Коммит
3700989b78
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 79 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 38 KiB |
|
@ -156,6 +156,21 @@
|
|||
"Next, we can use `split_train_test()` utility function to split the data in `yx.csv` into training and test sets based on the parameters described above. If we want to do a one-time model training and evaluation, we can split the data using the default settings provided in the function.\n",
|
||||
"\n",
|
||||
"The data split function will return training data and test data as dataframes. The training data includes `train_df` and `aux_df` with `train_df` containing the historical sales and `aux_df` containing price/promotion information. Here we assume that future price and promotion information up to a certain number of weeks ahead is predetermined and known. The test data is stored in `test_df` which contains the sales of each product.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"Splitting time series data into a single round of trainig and testing data:\n",
|
||||
"![Single split](../../assets/time_series_split_singleround.jpg)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"Splitting time series data into a multi round of trainig and testing data (for cross-validation):\n",
|
||||
"![Multi split](../../assets/time_series_split_multiround.jpg)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n",
|
||||
"Based on the above parameters, `HORIZON = 2` and `GAP = 2`, assuming the current week is week 135, our goal is to forecast the sales in week 137 and 138 using the training data. As you can see, the first forecasting week is 2 weeks away from the current week, as we want to leave time for planning inventory in practice."
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче