unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.87k stars 850 forks source link

Adding bootstrapping functionnality from residuals of a model #2161

Open Jonathan-87 opened 7 months ago

Jonathan-87 commented 7 months ago

It would be interesting to be able to add bootstrapping functionnality from residuals of a model of the time series, this would help :

  1. to compute prediction intervals when the method doesn't support it like for regression model (example here : https://otexts.com/fpp3/prediction-intervals.html) and access the full predictive distribution for these models;
  2. when a normal distribution for the residuals is an unreasonable assumption boostrapping is a good alternative (example here : https://otexts.com/fpp3/prediction-intervals.html);
  3. when we need to compute aggregate of forecast being compute at lower level (example here : https://otexts.com/fpp3/aggregates.html);
  4. generate new time series that are similar to our observed series using blocked bootstrap, this can be used for example to compute bagged forecast in order to improve forecast accuracy (https://otexts.com/fpp3/bootstrap.html);
dennisbader commented 7 months ago

Hi @Jonathan-87 , this looks closely related to the conformal prediction feature request. We haven't yet decided which algorithm to implement first, but we might go more towards Adaptive Conformal Prediction/Inference rather than the bootstrapping approaches (EnbPI).

The reason is that optimally we could avoid having to re-train the models, especially for heavier regression and torch models.

Jonathan-87 commented 7 months ago

@dennisbader Yes its closely related to the conformal prediction feature request, however do you have an idea how can we compute aggregate of forecast being compute at lower level ?