Repository navigation
v0.1.7
Why: the large-scale study of conformal prediction for time-series forecasting (Manokhin, Nurmatov, Sreenivas and Liang 2026, doi:10.5281/zenodo.24715782) ranked 66 configurations on 50,143 series. Every configuration in its top 20 can now be run from pyconformal, with the same intervals as the study’s code.
New module pyconformal.trackers, nine online methods with the interface of ACI (calibrate, threshold, update, run, and run(..., batch_size=k) for outcomes revealed in batches): SAOCP (Bhatnagar et al. 2023), DecayOCP (Angelopoulos, Barber and Bates 2024), LinearQuantileTracker (LQT, Areces et al. 2025, with the authors’ tuning grid), ACIBet (Podkopaev, Xu and Lee 2024), BellmanCI (Yang, Candès and Lei 2024), BCACI (bias-corrected ACI, Lade et al. 2026), RollingOriginCP (Halkiewicz 2026), DriftOCP (Liang, Ren and Chen 2026) and RCI (Feldman, Bates and Romano 2023); and WeightedQuantileConformal (recency-weighted empirical quantile, the study’s NexCP and WeightedConformal).
New option clip=True on AdaptiveConformalInference, DtACI, AgACI and BCACI: the always-finite rules that libraries and the study run (working levels held inside [0, 1], plain empirical quantile; for AgACI the authors’ two-sided BOA aggregation). Documented effect: the guarantee of the method no longer holds; in exchange no interval is infinite. Default unchanged (clip=False, guaranteed). run(..., batch_size=k) with clip=True.
Checked against the study’s implementations on 13 series, 11 levels, batch sizes 1 and 10: the same intervals to 1e–13, except AgACI(clip=True) (same scores; the study’s code loses digits in its aggregation weights when the experts nearly agree). Reference radii in tests/data/trackers_reference.npz.
New: CSPAuto, Conformal Seasonal Pools with the target (levels or one-step changes) and the seasonal period (none, declared, the hour of sub-hourly data, and with acf_peak=True the highest autocorrelation peak) chosen by weighted interval score on the history: the study’s CSP_auto and CSP_auto_acf, first and second of 66, and csp-forecaster 0.3.0’s CSPAuto. Same choice as the study’s code on 11 of 13 series; the other two are ties within sampling noise. update() appends new values.
New module pyconformal.evaluation: the study’s rolling-origin protocol (rolling_origin_design), its reference (SplitConformalReference: split conformal prediction with the plain empirical quantile), per-series metrics (coverage, tail misses, width, Winkler, MSIS, shares of infinite, inverted and missing intervals; MAE, RMSE, bias, MASE, RMSSE, sMAPE, MAPE; WIS and quantile CRPS with the study’s failure rules) and the headline score rcwis with pfva. Identical to the study’s scorer on 286 method-series runs, and to its aggregation including the bootstrap interval.
MultiQT.run(..., batch_size=k, reset=False): outcomes revealed in batches (one step size per batch, the authors’ delayed-feedback rule) and continuation after a warm-up. With these, MultiQT gives the study’s MultiQT and MultiQT_scaled intervals to 1e–13.
Speed (benchmarks/speed_trackers.py, time per step on 5,000 calibration errors): SAOCP 7.5 µs, 119 times faster than salesforce/online_conformal; DtACI with clipping 14 times faster than salesforce’s FACI; LQT 2.8 times faster than conformalopt; every tracker under 130 µs per step. Against the study’s own implementations: 2 to 82 times faster with the same intervals.
Places 21 to 30 of the study, each checked against the study’s code on 13 series at 11 levels with outcomes revealed in batches of 10:
SFOGD (scale-free online gradient descent, 26th): same radii to 1e–14.
New module pyconformal.univariate, forecasters that read only the series (fit(y), predict_interval, update, run(y, alpha, batch_size)): NaiveDiffInterval (21st, same intervals to 1e–14); CPTSD (conformal prediction with STL decomposition, Prinzhorn et al. 2024, 30th; on pyconformal’s STL, which gives statsmodels’ decomposition to 1e–13; same intervals as the study’s code to 1e–10 when fed the same histories; inside a batch it uses every earlier value, where the study’s code dropped values on series with fewer lags than the batch); LaplaceSkater (Peter Cotton’s laplace forecaster, 24th; needs pip install skaters; same intervals to 1e–12, twice as fast as the study’s loop).
New module pyconformal.online_quantile: QuantileRegressionInterval (23rd; identical intervals with the study’s quantile forest) and AdaptiveEnbCQR (adaptive ensemble CQR, Sousa, Tomé and Moreira 2023, 25th; same intervals to 1e–14). Any model with predict(X, quantiles=...); pyconformal’s quantile forest by default, 4 to 6 times faster.
KOWCPI (Lee, Xu and Xie, ICLR 2025, 28th) with NadarayaWatsonQuantile (weighted Nadaraya-Watson quantile regression with the Hall-Presnell tilt and AIC bandwidth, compiled): same intervals as the study’s code to 1e–15, 8 times faster.
SPCI options for the study’s variant (29th): batch_size (one quantile model per step of a batch, the authors’ multi-step code), conformalize (CQR widening), beta_grid="closed", quantile_model= (any quantile model). Same intervals to 1e–14. Defaults unchanged.
EnbPI(quantile="empirical"): NumPy’s 1 - alpha quantile, as in the paper’s code and the study (EnbPI_RF, 27th; same intervals given the study’s ensemble). EnbPI.run(..., alpha=[...]) and SPCI.run(..., alpha=[...]) give several levels from one pass of the members.
THIRD_PARTY_NOTICES.md: the Apache 2.0 notice for the code that follows salesforce/online_conformal, and credits for the Bellman CI programme (ZitongYang/bellman-conformal-inference) and the BOA aggregation (R package opera).