scikit-learn-contrib / MAPIE

A scikit-learn-compatible module to estimate prediction intervals and control risks based on conformal predictions.
https://mapie.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1.24k stars 101 forks source link

Sequential Predictive Conformal Inference (SCPI) for Time Series #370

Open Kevin-Chen0 opened 9 months ago

Kevin-Chen0 commented 9 months ago

Describe the feature request you'd like Include SCPI as a second, alternative method within the MapieTimeSeriesRegressor class alongside the existing EnbPI method.

Why is this beneficial? SCPI improves upon EnbPI by including serial dependence across prediction residuals (or conformity score), aka sequential conformal prediction. This can further reduce the prediction interval width for the same data and empirical coverage compared to EnbPI.

Additional context Xu, C. and Xie, Y. Sequential predictive conformal inference for time series. arXiv preprint arXiv:2212.03463, 2022b. [link]

LacombeLouis commented 9 months ago

Hi @Kevin-Chen0, Thank you for your comment. Indeed, I think this could be a valuable addition to MAPIE. For the moment, we have focused our efforts in Time Series on the following papers (#334):

If you want to contribute to the library, I think this could be a very interesting new addition! Don't hesitate to contact us if you have any questions regarding the how and where to implement this method.

Kevin-Chen0 commented 9 months ago

Hi @LacombeLouis,

Yes, I can contribute to MAPIE by adding SCPI there. Will you also be including ACI in MapieTimeSeriesRegressor? That way, we can ensure I follow the same structure when incorporating SCPI.

Thanks! ~Kevin

LacombeLouis commented 9 months ago

Hi @Kevin-Chen0,

Indeed, we are including it at this very moment, it's in the final stages of development... 🔜 https://github.com/scikit-learn-contrib/MAPIE/pull/341.

I think that as soon as it's released, we will make sure to keep you posted! Thank you! Louis

valeman commented 7 months ago

Hi @Kevin-Chen0, Thank you for your comment. Indeed, I think this could be a valuable addition to MAPIE. For the moment, we have focused our efforts in Time Series on the following papers (#334):

  • Gibbs, I., & Candes, E. (2021). Adaptive conformal inference under distribution shift. Advances in Neural Information Processing Systems, 34, 1660-1672.
  • Zaffran, M., Féron, O., Goude, Y., Josse, J., & Dieuleveut, A. (2022, June). Adaptive conformal predictions for time series. In International Conference on Machine Learning (pp. 25834-25866). PMLR.

If you want to contribute to the library, I think this could be a very interesting new addition! Don't hesitate to contact us if you have any questions regarding the how and where to implement this method.

I think SPCI outperforms these methods as who's in SPCI paper?