Skip to content

Evaluating interval forecasts: the protocol, split conformal reference and rcWIS

The evaluation of the large-scale study of conformal prediction for time-series forecasting, as a module: the rolling-origin protocol, the split conformal reference, the metrics and the headline score.

Use it when You compare interval forecasters on time series and want the study's rules, or want your method scored as in the study.
Guarantee Not a method: the scoring rules are the study's, including how failures count.
In the library pyconformal.evaluation: rolling_origin_design, SplitConformalReference, interval_metrics, point_metrics, distribution_metrics, scales, rcwis, pfva, size_stratified_coverage, rolling_coverage, reliability_curve, pit_calibration
Source Manokhin, Nurmatov, Sreenivas and Liang (2026), doi:10.5281/zenodo.24715782; Bracher et al. (2021) for WIS
Example needs pyconformal

Why. The study found that how failures are scored decides rankings, and that many recent methods do not beat split conformal prediction on the same forecasts. With this module any method can be scored as in the study and compared with its published ranking.

Protocol. One step ahead, lag features (the season, held in [7, 48]; 24 without a season), the last tenth of the series as the test part (at least one prediction length, at most twenty), history capped at 5,000 rows, forecasts issued in batches of 10 and then revealed, eleven central intervals from 98% to 10%.

Reference. Split conformal prediction on the same point model: fitted on the first half of the training rows, half-width the plain np.quantile of the absolute errors on the second half. It is not the exact conformal method; SplitConformalRegressor is.

rcWIS. Per unit, the mean weighted interval score of a method divided by that of the reference on the same series and steps, clipped to [0.01, 100]; a failed unit takes 100. Geometric mean within groups of sources, then across groups. PFVA = 1 - rcWIS is the share by which the method improves on split conformal prediction.

Failures count. A missing forecast is a miss and makes the series score infinite; an infinite bound gives an infinite score; an inverted interval is empty; a declined level scores like an infinite interval (declined="given" gives the study's softer sensitivity rule).

Checked against the study's scoring code on 286 method-series runs (every metric identical) and against its aggregation, bootstrap interval included.

Minimal example

Copy, paste, run.

import numpy as np
from pyconformal.point_models import Ridge
from pyconformal import DecayOCP, evaluation as ev

rng = np.random.default_rng(0)
t = np.arange(2000)
y = 10 + 3 * np.sin(2 * np.pi * t / 24) + rng.normal(size=t.size) * (1 + t / 2000)

d = ev.rolling_origin_design(y, "H")                     # hourly: season 24, lags 24
ref = ev.SplitConformalReference(Ridge(alpha=1.0)).fit(d["X_train"], d["y_train"])
B = ref.predict_interval(d["X_test"])                     # (n, 2, 11 levels)
point = ref.predict(d["X_test"])
ref_wis = ev.distribution_metrics(d["y_test"], point, B[:, 0, :].T, B[:, 1, :].T)["wis"]

# a method: DecayOCP on the same point model's errors, batches of 10
n = len(d["y_train"]); split = int(n * 0.8)
model = Ridge(alpha=1.0).fit(d["X_train"][:split], d["y_train"][:split])
cal = d["y_train"][split:] - model.predict(d["X_train"][split:])
p = model.predict(d["X_test"])
lo, hi = [], []
for a in ev.ALPHAS:
    r = DecayOCP(alpha=a).calibrate(residuals=cal).run(y_pred=p, y=d["y_test"], batch_size=ev.BATCH)
    lo.append(r.intervals[:, 0]); hi.append(r.intervals[:, 1])
wis = ev.distribution_metrics(d["y_test"], p, np.array(lo), np.array(hi))["wis"]

sc = ev.scales(d["y_train"], d["season"])
print(ev.interval_metrics(d["y_test"], lo[2], hi[2], 0.1, sc["snaive_mae"])["coverage"])
print(ev.rcwis(np.array([wis]), np.array([ref_wis]), n_boot=0)["rcwis"])

# Diagnostics: size-stratified coverage and rolling coverage on the 90% band
covered = (d["y_test"] >= lo[2]) & (d["y_test"] <= hi[2])
widths = hi[2] - lo[2]
print("worst-bin SSC:", round(ev.size_stratified_coverage(covered, widths, n_bins=5)["worst"], 3))
print("last rolling coverage:", round(float(ev.rolling_coverage(covered, window=50)[-1]), 3))

Diagnostics

Beyond the study's WIS/rcWIS protocol, pyconformal.evaluation includes four pure-NumPy diagnostics for inspecting conditional coverage and probability calibration:

  • size_stratified_coverage(covered, sizes, n_bins=5) — size-stratified coverage (SSC; Angelopoulos et al. 2021) across quantile bins of interval width or set size; reports worst (minimum bin coverage) and marginal.
  • rolling_coverage(covered, window=50) — rolling empirical coverage over a time-series stream.
  • reliability_curve(y_true, proba, n_bins=10, strategy="uniform") — reliability curve, Expected Calibration Error (ece), and Maximum Calibration Error (mce) for binary probabilities (e.g. from VennAbers).
  • pit_calibration(pit_values, n_bins=10) — histogram density and exact one-sample Kolmogorov–Smirnov statistic (ks_stat) against Uniform(0, 1) for PIT values from ConformalPredictiveSystem.predict_cdf.
  • worst_slab_coverage(X, covered, delta=0.2) — Worst-Slab Coverage (Cauchois et al., JMLR 2021) using a 25%/75% split so the reported worst slab coverage is unbiased.
  • conditional_coverage_diagnostic(X, covered, alpha=0.1) — out-of-fold classifier-based conditional coverage diagnostic (Braun et al., ICML 2026) reporting Excess Risk of Target Coverage (ert), mae_gap, and worst_decile coverage using pyconformal's own ExtraTrees.

More