zalandoresearch / pytorch-ts

PyTorch based Probabilistic Time Series forecasting framework based on GluonTS backend
MIT License
1.24k stars 191 forks source link

Continue training after making predictor #58

Open aaronfderybel opened 3 years ago

aaronfderybel commented 3 years ago

I would like to perform time series cross validation on a fairly large dataset. To see if the results are consistent over multiple folds.

The way I approach this is to stop training at certain points in time, then predict the next 2 weeks of my data. After this I can continue training (see figure below.) image

Looking at the source code pts/model/estimator.py I can see a function train_model : https://github.com/zalandoresearch/pytorch-ts/blob/5da3be5abd4a81de7a81949fe2cf24fde44cb171/pts/model/estimator.py#L89

Which outputs a trained neural network

The other function I use now train: https://github.com/zalandoresearch/pytorch-ts/blob/5da3be5abd4a81de7a81949fe2cf24fde44cb171/pts/model/estimator.py#L164

Creates a predictor object

I'm not sure how to combine these functions to achieve the desired result, anyone has experience in using this?