pyconformal: Exact and Fast Conformal Prediction for Tabular Data and Time Series
Abstract
Conformal prediction is used for its guarantee: if calibration and test data are exchangeable, a 90% split-conformal interval covers at least 90% of the time, for any model and any calibration size. That guarantee belongs to an exact procedure, and software loses it through small choices. We audited thirteen Python and R packages on data where the guarantee must hold, reading five conformal libraries module by module, and found about thirty faults. Two forecasting libraries cover 63% at a 90% target with their default of two calibration windows. One library's prediction sets cover 45% when rows are predicted one at a time. Two implementations of adaptive conformal inference clip the working level and lose the guarantee that defines the method. The basic split-conformal routines of the main libraries met their level in every test. We present pyconformal, an MIT-licensed package that implements about thirty conformal methods for regression, classification, probability calibration, predictive distributions, time series and panel data behind one interface. Every method is tested against its definition, against reference code where it exists, and against its guarantee. The package also contains algorithmic improvements: an exact Venn-Abers kernel in integer arithmetic, rank trees for online methods, closed forms for conformal predictive distributions, CV+ in 3 megabytes where MAPIE needs 3 gigabytes, and a repaired rule for conformal interquantile regression. With identical output, Venn-Abers calibration on a million points takes 0.37 seconds against 75 in the reference implementation, and conformal predictive intervals for a million test points take 0.01 seconds against 79 in crepes. We describe the design, the algorithms and what each gains in time and memory, the verification method, the audit and the benchmarks.
Create a lesson
Metadata
Related papers
Beyond Clean Data: Robust Test-Time Adaptation on Noisy Time-Series Streams
Shared title terminologycs.LGKaixin Wang, Jinping Wang, Zhiqiang Gao
Stiefel-Projected 4D Tucker Fast-Weight Memory: Zero-SVD Cubic-Kernel Linear Attention, Exact Subspace Unlearning and O(1) Multi-Hop Retrieval
Shared title terminologycs.LGShubham Barmase
TS-RSI: Recursive Self-Improvement in Long-Term Time Series Forecasting
Shared title terminologycs.LGXinhua Miao, Bowei Yang, Zhengong Cai
The Target Betrays the Trigger: Defending Multivariate Time-Series Forecasters Against Backdoor Attacks
Shared title terminologycs.LGChibueze Peace Obioma, Youcheng Sun, Edoardo Manino et al.
Measurement-Triggered Channel Memories for Irregularly Sampled Clinical and Wearable Time Series
Shared title terminologycs.LGTero Keski-Valkama
ClockRace: Temporal Graph Prediction from Addressed Time-Referenced Records
Shared title terminologycs.LGTero Keski-Valkama