Implements basic Adaptive Conformal Inference (ACI) for sequential prediction. The miscoverage level alpha is adjusted online based on whether previous predictions covered the true values, maintaining long-run coverage even under distribution shift.
Value
A list with components:
- lower
Numeric vector of lower bounds.
- upper
Numeric vector of upper bounds.
- covered
Logical vector indicating whether each interval covered the true value.
- alphas
Numeric vector of the adapted alpha values at each step.
- coverage
Overall empirical coverage.
Details
ACI provides asymptotic coverage guarantees under distribution drift, not the finite-sample guarantees of split conformal prediction. The long-run average coverage converges to \(1 - \alpha\) as the sequence length grows (Gibbs and Candes, 2021).
The miscoverage level is updated online as \(\alpha_{t+1} = \alpha_t + \gamma(\alpha - \mathrm{err}_t)\), where \(\mathrm{err}_t\) indicates that \(Y_t\) fell outside the interval. A miss lowers \(\alpha_t\) and so widens the next interval.
Results are sensitive to \(\gamma\): too small and the method cannot track a shift, too large and \(\alpha_t\) becomes volatile. Gibbs and Candes (2024) remove this tuning problem by aggregating over a set of learning rates; that extension is not implemented here.
References
Gibbs, I. and Candes, E. (2021). Adaptive conformal inference under distribution shift. Advances in Neural Information Processing Systems, 34.
See also
Other regression methods:
conformal_cqr(),
conformal_cv(),
conformal_jackknife(),
conformal_mondrian(),
conformal_split(),
conformal_weighted()