Multivariate & multi-step copula and ellipsoidal conformal regression¶
Joint prediction regions for multi-target (N, D) regression and correlated multi-step (N, H) forecast trajectories — dramatically tighter than Bonferroni (alpha / D).
| Use it when | You predict multiple correlated targets or multi-step horizons simultaneously and need simultaneous joint coverage \(\ge 1 - \alpha\). |
| Guarantee | Exact finite-sample joint coverage \(\ge 1 - \alpha\) via disjoint marginal/covariance and calibration splits. |
| In the library | CopulaConformalRegressor, EllipsoidalConformalRegressor |
| Source | Messoudi, Destercke and Rousseau (2021); Sun and Yu (NeurIPS 2023, CopulaCPTS); Johnstone and Cox (2021) |
| Example needs | pyconformal |
Finite-sample joint guarantee
Both CopulaConformalRegressor (empirical copula hyper-rectangles) and EllipsoidalConformalRegressor (shrinkage Mahalanobis ellipsoids) guarantee exact finite-sample simultaneous coverage across all \(D\) targets:
$\(\mathbb{P}\!\left(Y_{n+1} \in \hat{C}(X_{n+1})\right) \ge 1 - \alpha\)$
Minimal example¶
Copy, paste, run.
import numpy as np
from pyconformal import CopulaConformalRegressor, EllipsoidalConformalRegressor
rng = np.random.default_rng(0)
n, D = 1200, 6
cov = 0.85 * np.ones((D, D)) + 0.15 * np.eye(D)
L = np.linalg.cholesky(cov)
P = rng.normal(size=(n, D))
Y = P + rng.standard_normal((n, D)) @ L.T
cop = CopulaConformalRegressor(alpha=0.1, random_state=0).calibrate(y_pred=P[:600], y=Y[:600])
iv = cop.predict_interval(y_pred=P[600:])
joint_cov = np.all((Y[600:] >= iv[:, :, 0]) & (Y[600:] <= iv[:, :, 1]), axis=1).mean()
print(f"Copula joint coverage: {joint_cov:.3f} mean radius: {cop.radii_.mean():.2f}")
ell = EllipsoidalConformalRegressor(alpha=0.1, random_state=0).calibrate(y_pred=P[:600], y=Y[:600])
print(f"Ellipsoid joint coverage: {ell.contains(y_pred=P[600:], y=Y[600:]).mean():.3f} radius: {ell.radius():.2f}")
More¶
- Full argument list: API reference
- All methods: what's inside