[edit]
online-cp: a Python Package for Online Conformal Prediction, Conformal Predictive Systems and Conformal Test Martingales
Proceedings of the Fourteenth Symposium on Conformal and Probabilistic Prediction with Applications, PMLR 266:595-614, 2025.
Abstract
Conformal prediction (CP) has gained increasing attention in machine learning owing to its ability to provide reliable prediction sets with well-calibrated uncertainty estimates. While most existing CP implementations focus on inductive conformal prediction (ICP), full conformal prediction–also known as online or transductive CP–offers the strongest validity guarantees but has been largely absent from open-source software due to its computational complexity. In this paper, we introduce \texttt{online-cp}, a Python package designed for online conformal prediction, conformal predictive systems (CPS), and conformal test martingales. The package implements several online CP algorithms, enabling efficient and principled uncertainty quantification in streaming data scenarios. Additionally, it includes tools for testing the exchangeability assumption by using conformal test martingales. We demonstrate the functionality of \texttt{online-cp} through classification and regression examples as well as applications to predictive systems and exchangeability testing. By making online CP methods accessible, \texttt{online-cp} provides a foundation for broader adoption and further development of conformal prediction in real-time machine learning applications