sktime / pytorch-forecasting

Time series forecasting with PyTorch
https://pytorch-forecasting.readthedocs.io/
MIT License
3.92k stars 620 forks source link

Question: How to handle gaps in a custom dataset #483

Open smkaropp opened 3 years ago

smkaropp commented 3 years ago

I have an hourly dataset for many years with three time-series in which one is the target while other two is always available. The problem is that I have huge gaps, sometimes months. If I understood correctly setting allow_missings=True just fills those empty ones but that's not what I want. I just don't want to use missing values.

For instance if my dataset starts on 01-01-2015 and ends on 12-15-2019 with a gap between say 04-04-2017 and 06-09-2017, I just want TimeSeriesDataSet stop getting data points at the start of the gap and start again at the end of the gap. How would you suggest me to handle these gaps?

jdb78 commented 3 years ago

I suggest to assign each continuous time series chunk an id. You can then use it as part of the group_ids. Should solve the problem.