awslabs / gluonts

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

Put out distr_arg instead of samples for DeepAR #3168

Open jschemm opened 1 month ago

jschemm commented 1 month ago

Description

When doing predictions with DeepAR, the output are samples. The samples are taken from the set distr_output. The parameters of this distribution (distr_args) are calculated in each forecasting step, but only used internally and not returned.

When saving large amount of forecasts, only saving the distr_args is much more economical. This is why I would love to have the option to choose distr_args as output instead of the samples.

References

Here is the relevant part of the code: https://github.com/awslabs/gluonts/blob/ff1f8e23de07acffb919acfc17585fd27e95c27d/src/gluonts/mx/model/deepar/_network.py#L1116