Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prediction interval for ES-RNN #35

Closed
marijnhazelbag opened this issue Nov 12, 2021 · 5 comments
Closed

Prediction interval for ES-RNN #35

marijnhazelbag opened this issue Nov 12, 2021 · 5 comments

Comments

@marijnhazelbag
Copy link

Thank you for making this implementation available. Sorry if I missed It; Is there an easy way to obtain prediction intervals with your ES-RNN implementation?

@kdgutier
Copy link
Owner

kdgutier commented Nov 12, 2021

Hi @marijnhazelbag,
For the moment we are only estimating quantiles using the quantile regression like in the paper and main M4 competition.
We have implemented a multi-quantile loss function here:
https://github.com/Nixtla/nixtlats/blob/master/nixtlats/losses/pytorch.py#L317

I imagine, it could be easy to adapt the final layer of the ES-RNN to output multi-quantiles.
https://github.com/kdgutier/esrnn_torch/blob/master/ESRNN/utils/ESRNN.py#L285

Let me know if you want to try it, or would you need help with it.

@marijnhazelbag
Copy link
Author

Thank you for the swift response! I will try and let you know if I run into problems :)

@kdgutier
Copy link
Owner

I am reaching a friend who might have already done it to point you to his work.

@AzulGarza
Copy link
Collaborator

Hi, @marijnhazelbag,

Thanks for your interest. We have written the multi-quantile version of the ESRNN model: MQESRNN; you can find it in our new library for time series forecasting using Deep Learning named nixtlats, in particular here. You can import it using:

from nixtlats.models.esrnn.mqesrnn import MQESRNN

You pass a list of percentiles to obtain prediction intervals; for example, if you want a 90% prediction interval, you could use training_percentiles=[5, 50, 95]. Under the hood, the model trains the ESRNN model using the multiquantile loss.

@marijnhazelbag
Copy link
Author

Thank you, gentlemen! I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants