This is an improved (fixed) implementation of the timeseries forecasting algorithm DeepAR by Amazon. I am providing a clear implementation in a Jupyter Notebook and clean Cython 3, without requiring SageMaker.
- Original paper: https://arxiv.org/pdf/1704.04110
- Documentation by Amazon: https://docs.aws.amazon.com/sagemaker/latest/dg/deepar_how-it-works.html
DeepAR is an algorithm developed by Amazon Research producing accurate probabilistic timeseries forecasts, based on training an auto regressive recurrent network model on a large number of related time series.
- Be careful with your
pandasversion asfreqparameter has been recently deprecated fordf.Timestamp() - If you are using Google Collab to run the code with a
TPUit might fail with errorTypeError: cannot pickle 'generator' object, due to PyTorch's generator handling. Therefore, you might need to run in via a CPU instance itself
