The book's own online update, quoted from p. 519: err_t = 1 if Y_t
is outside Chat(alpha_t) else 0; alpha_{t+1} = alpha_t + gamma
(alpha - err_t), with alpha_1 = alpha. inside is the sequence of
coverage outcomes, so this is a pure recursion over caller data.
The method is Gibbs, I. and Candes, E. (2021), Adaptive Conformal
Inference Under Distribution Shift, NeurIPS 34 (arXiv:2106.00170),
the book's Reference 13.
Usage
morie_aci(inside, alpha = 0.1, gamma = 0.01)
Arguments
- inside
logical vector, TRUE when the observation was covered
- alpha
target miscoverage
- gamma
step size
Value
list(alpha, final, empirical, target, gamma, n, minalpha,
maxalpha)
Examples
# coverage indicators of a forecaster that covers about 88% of the time
set.seed(1)
inside <- runif(300) > 0.12
r <- morie_aci(inside, alpha = 0.1, gamma = 0.01)
c(r$empirical, r$final)
#> [1] 0.09333333 0.12000000