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

[DistributionLoss] Add a "return samples" option #864

Closed
Antoine-Schwartz opened this issue Jan 18, 2024 · 1 comment
Closed

[DistributionLoss] Add a "return samples" option #864

Antoine-Schwartz opened this issue Jan 18, 2024 · 1 comment

Comments

@Antoine-Schwartz
Copy link

Description

As already proposed by DeepAR on Sagemaker, it would be interesting to be able to retrieve the output samples when using a DistributionLoss.

Use case

Retrieving these trajectories directly in outputs allows for greater independence of use cases that come after forecasting. Typically, being able to recalculate different quantiles without having to relaunch a forecast job is a must for many supply chain optimization modules.

@elephaint
Copy link
Contributor

Hi, apologies for the late reply. You can achieve what you want by specifying a large number of quantiles, for example:

loss = DistributionLoss(distribution='StudentT', quantiles=np.linspace(0, 1, 100))

This will effectively allow you to obtain the sampled values for the distribution per timestep in the forecast.

Does that answer your question?

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

No branches or pull requests

2 participants