Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
2.69k stars 312 forks source link

Conformal Prediction in NeuralForecast #995

Open valeman opened 1 month ago

valeman commented 1 month ago

Description

It would be great to have Conformal Prediction in NeuralForecast, similar to statsforecast and mlforecast.

Use case

No response

JQGoh commented 1 month ago

@AzulGarza I am interested to contribute for the implementation of Conformal Prediciton in NeuralForecast

I checked the implementations in Statforecast/MLForecast, considering to to follow your implementation for _add_conformal_distribution_interval and _add_conformal_error_intervals

However, I also noticed that NeuralForecast has quantiled outputs when we specify loss such as MQLoss (as suggested by quantiles_to_outputs). If users specify conformal prediction interval and use MQLoss, think we shall need to handle this properly such that how should we present the quantiled outputs to the users.

My current thought is when users specify Conformal Prediction parameter, we can compute the prediction intervals using the -median result returned by MQLoss during the cross-validation, while raising a warning to remind the users that the outputs are computed following the Conformal Prediction scheme.

I am rather new to Conformal Prediction and would love to hear from Nixtla's team feedback on this. cc: @elephaint noticed your recent work on Implicit Quantile Networks, which might be relevant.