unit8co / darts

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

Conformal Predictions #1704

Open dennisbader opened 1 year ago

dennisbader commented 1 year ago

Conformal predictions could be a valuable addition to darts. It would require some brain storming/planning of how (or if) we can integrate this into our API / extend the API.

Some links:

jlopezpena commented 11 months ago

Perhaps Darts could leverage MAPIE for implementing conformal inference?

lsorber commented 7 months ago

For those interested, Conformal Tights is a Python package that adds conformal prediction to Darts: https://github.com/radix-ai/conformal-tights

dennisbader commented 3 months ago

Working on it. For the beginning we were thinking about the Naive Conformal Model and Conformalized Quantile Regression.

AugustComte commented 3 months ago

Could you add a facility for weighting seasonality i.e. yearly, and decay weighting for recency, within the Naive approach? I find these to be useful.

dennisbader commented 2 months ago

Hmm.. For the first version probably not (to keep things simple for a start, it's already getting quite big ;) ). But the goal is to make it easy to define a custom CP model/class with the ability to customize how to calibrate the intervals based on the residuals.

After the first version, we're more than happy to further improve / expand on it.

AugustComte commented 2 months ago

That makes sense; I also found it was a large amount of work, especially with PyTorch models. But then I was trying to hack PUNCC and MAPIE...

I'm unsure if this is useful, but I have found this YouTube channel a useful reference: https://github.com/mtorabirad/MLBoost

Anyhow, thank you for the update, Dennis. I'm excited about this. We use darts in production, and your work is greatly appreciated!