awslabs / gluonts

Probabilistic time series modeling in Python
https://ts.gluon.ai
Apache License 2.0
4.57k stars 750 forks source link

Is there a straightforward way of using Poisson or Negbin with DeepAR instead of Gaussian? #633

Closed SkanderHn closed 4 years ago

SkanderHn commented 4 years ago

My impression from the DeepAR paper, and the GluonTS paper is that the main emphasis is on full density forecasts, but looking at the tutorials and docs, I don't see any simple way of specifying which type of distribution to model when calling DeepAREstimator, or which distribution is being used by default for that estimator (presumably Normal - but I can't tell).

The only thing I could find so far is the probabilistic forecasting section in the extended tutorial, but that seems to involve building a model (almost) from scratch.

Is there a straightforward way of using Poisson or Negbin with DeepAR instead of Gaussian? And which distribution is DeepAREstimator using by default?

vafl commented 4 years ago

You should be able to just plug in the NegativeBinomialOutput as the distr_output in DeepAR and many other models. See: https://github.com/awslabs/gluon-ts/blob/master/src/gluonts/model/deepar/_estimator.py#L131

SkanderHn commented 4 years ago

Thanks