question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding prediction interval to forecast

See original GitHub issue

Is your feature request related to a current problem? Please describe. Most algorithms have a prediction interval also associated with the forecast. This could be implemented in an algorithm agnostic way also.

https://otexts.com/fpp2/prediction-intervals.html

Describe proposed solution In predict have an optional parameter, prediction_interval which when set True. returns not just forecast (yhat) , but also yhat_upper and yhat_lower based on the prediction interal.

Can use the sample Naive forecast logic mentioned here to implement this.

Describe potential alternatives Prophet, auto arima etc provides these prediction interval values.

Additional context This could also be used in plots for the forecast.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
hrzncommented, Mar 8, 2021

Thanks for the suggestion. We have this (or at least something similar) on our roadmap.

2reactions
hrzncommented, Jul 10, 2021

This has been released in v0.9.0.

Some models support specifying num_samples to predict(), in which case they will return a “stochastic” TimeSeries containing num_samples samples, which describe the distribution of the time series’ values. Some of the neural networks (at the moment RNNModel and TCNModel) are able to produce such stochastic forecasts if they are built specifying a certain likelihood parameter (e.g., darts.utils.likelihood_models.GaussianLikelihoodModel() to train the model with a negative Gaussian log likelihood loss).

We went for such a sampling-based representation (instead, for instance, of returning fixed confidence intervals), because it allows (i) to compute arbitrary quantiles (using e.g. TimeSeries.quantiles_df() or TimeSeries.quantile_timeseries() and (ii) for multivariate series it allows to capture the joint distribution over all components without assuming a specific parametric form.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Prediction Intervals to your Forecasting Model
In this post, we introduced a method to produce prediction intervals as a way to provide uncertainty estimation in forecasting. The procedure is ......
Read more >
3.5 Prediction intervals | Forecasting: Principles and ... - OTexts
The value of prediction intervals is that they express the uncertainty in the forecasts. If we only produce point forecasts, there is no...
Read more >
3.3 - Prediction Interval for a New Response | STAT 501
In this section, we are concerned with the prediction interval for a new response, y n e w , when the ... Adding...
Read more >
Prediction intervals when forecasting with machine learning ...
More formally, a prediction interval defines the interval within which the true value of the response variable is expected to be found with...
Read more >
Better prediction intervals for time series forecasts
A prediction interval is a similar but not identical concept to a confidence interval. A prediction interval is an estimate of a value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found