| Title: | Extreme Conformal Prediction Intervals |
|---|---|
| Description: | This new extreme conformal prediction framework provides informative prediction intervals at the high-confidence levels for which classical conformal methods fail. In applications with potentially high-impact events, a very high level of confidence is often required for predictions. If that level is too large relative to the amount of data used for calibration, classical conformal methods provide infinitely wide, thus, uninformative prediction intervals. Our extreme conformal procedure bridges extreme value statistics and conformal prediction to provide reliable and informative prediction intervals with high-confidence coverage, which can be constructed using any black-box extreme quantile regression method. A weighted version of the approach can account for nonstationary data. The methodology was introduced in Pasche, Lam, and Engelke (2026) <doi:10.1007/s10687-026-00536-9>. |
| Authors: | Olivier C. Pasche [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-1202-9199>) |
| Maintainer: | Olivier C. Pasche <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.2.2 |
| Built: | 2026-06-24 10:24:31 UTC |
| Source: | https://github.com/cran/ExtremeConformal |
Single-sided block-weighted conformal prediction interval from conformalizer
block_weighted_conformal_PI_unilat( Q_pred, block_ids, dQ_blocks, return_format = c("upper_limit", "interval", "text"), ymin = c(-Inf), coverage_proba = NULL, coverage_alpha = NULL )block_weighted_conformal_PI_unilat( Q_pred, block_ids, dQ_blocks, return_format = c("upper_limit", "interval", "text"), ymin = c(-Inf), coverage_proba = NULL, coverage_alpha = NULL )
Q_pred |
Vector of extreme quantile regression predictions for the test data (same length as the number of test points). |
block_ids |
Vector of block IDs for each test point, of the same length as |
dQ_blocks |
Vector of block-specific conformal corrections to be added to the extreme quantile regression predictions, of the same length as the number of blocks. |
return_format |
Format of the returned prediction interval. Either 'upper_limit' for a numerical vector of upper PI limits (default), 'interval' for a data frame with columns of lower and upper PI limits, or 'text' for a single string description of the PI (only available for single predictions). |
ymin |
Lower endpoint for the response distribution (if known). Can be a single value (marginal lower endpoint), or
a vector of the same length as |
coverage_proba, coverage_alpha
|
(Optional) Marginal coverage probability (or level alpha) for the conformal prediction interval.
Only one of |
Depending on the return_format argument, either a numerical vector of upper prediction interval (PI) limits,
a data frame with lower and upper PI limits, and the block IDs, as columns (and optionally coverage probability and alpha),
or (only available for compatibility) a single string description of the PI (for single predictions only).
Single-sided conformal prediction interval from conformalizer
conformal_PI_unilat( Q_pred, unilat_conformalizer, return_format = c("upper_limit", "interval", "text"), ymin = c(-Inf), coverage_proba = NULL, coverage_alpha = NULL )conformal_PI_unilat( Q_pred, unilat_conformalizer, return_format = c("upper_limit", "interval", "text"), ymin = c(-Inf), coverage_proba = NULL, coverage_alpha = NULL )
Q_pred |
Vector of extreme quantile regression predictions for the test data (same length as the number of test points). |
unilat_conformalizer |
Either a conformalizer object obtained from |
return_format |
Format of the returned prediction interval. Either 'upper_limit' for a numerical vector of upper PI limits (default), 'interval' for a data frame with columns of lower and upper PI limits, or 'text' for a single string description of the PI (only available for single predictions). |
ymin |
Lower endpoint for the response distribution (if known). Can be a single value (marginal lower endpoint) or
a vector of the same length as |
coverage_proba, coverage_alpha
|
(Optional) Marginal coverage probability (or level alpha) for the conformal prediction interval.
Only one of |
Depending on the return_format argument, either a numerical vector of upper prediction interval (PI) limits,
a data frame with lower and upper PI limits as columns (and optionally coverage probability and alpha),
or a single string description of the PI (for single predictions only).
conformal_PI_unilat(Q_pred=c(10,12), unilat_conformalizer=0.3, return_format='upper_limit')conformal_PI_unilat(Q_pred=c(10,12), unilat_conformalizer=0.3, return_format='upper_limit')
The main function of this package, performing single-sided extreme conformal prediction from extreme quantile regression predictions.
This function computes the conformal correction score-quantile (or )
to be added to the extreme quantile regression prediction(s) to obtain the desired PIs.
It can optionally perform weighted conformal prediction for nonexchangeable data (e.g. under distribution shift or drift),
by providing calibration-sample weights.
conformalize_EQR_unilat( EQR_pred, y_calibr, coverage_proba = NULL, coverage_alpha = NULL, method = c("GPD_safeprofile", "GPD_boot", "GPD_profile", "Empirical", "GPD_profile_naive", "GPD_delta", "GPD_max", "GPD_simple", "Hill"), threshold_lvls = NULL, alpha_correction = c("Sidak", "Bonferroni"), correction_prop = 0.5, R = 1004, min_obs_GPD = 10, profile_init_step_pos = 100, profile_init_step_neg = 10, profile_tol = 0.001, profile_steps_beyond_conf = 5, profile_max_steps = 1000, alpha_profile_naive = 0.01, obs_weights = NULL, test_weight = NULL, return_q_list = FALSE, verbose = 1, .pre_sorted_scores = NULL )conformalize_EQR_unilat( EQR_pred, y_calibr, coverage_proba = NULL, coverage_alpha = NULL, method = c("GPD_safeprofile", "GPD_boot", "GPD_profile", "Empirical", "GPD_profile_naive", "GPD_delta", "GPD_max", "GPD_simple", "Hill"), threshold_lvls = NULL, alpha_correction = c("Sidak", "Bonferroni"), correction_prop = 0.5, R = 1004, min_obs_GPD = 10, profile_init_step_pos = 100, profile_init_step_neg = 10, profile_tol = 0.001, profile_steps_beyond_conf = 5, profile_max_steps = 1000, alpha_profile_naive = 0.01, obs_weights = NULL, test_weight = NULL, return_q_list = FALSE, verbose = 1, .pre_sorted_scores = NULL )
EQR_pred |
Vector of extreme quantile predictions for the calibration data,
ideally at level |
y_calibr |
Vector of observed response values of the calibration data (same length as |
coverage_proba, coverage_alpha
|
Marginal coverage probability (or level alpha) for the conformal prediction interval.
Only one of |
method |
Method for constructing the conformal prediction interval. Defaults to |
threshold_lvls |
Threshold probability level for the GPD-based methods.
The |
alpha_correction |
Confidence correction method for the CI-based extreme conformal prediction intervals
used to choose |
correction_prop |
Relative (pseudo-)proportion between the values of |
R |
Number of bootstrap replicates for the |
min_obs_GPD |
Minimum number of observations above the threshold for the GPD-based methods. |
profile_init_step_pos, profile_init_step_neg
|
Initial binary-search step size, in the positive and negative directions,
for the profile-likelihood methods. See |
profile_tol |
Tolerance for the profile-likelihood search. See |
profile_steps_beyond_conf |
Number of safety steps beyond the confidence line for the profile-likelihood search.
See |
profile_max_steps |
Maximum number of initial search steps for the profile-likelihood CIs.
See |
alpha_profile_naive |
CI confidence level (i.e., the equivalent of |
obs_weights |
Optional vector of sample weights (same length as |
test_weight |
Weight of the test point for which the weighted conformal prediction is performed.
Only necessary for the |
return_q_list |
Boolean indicating whether to return a debug quantile list. |
verbose |
Verbose level (0 for no messages, 1 for warnings, 2 for warnings duplicated as |
.pre_sorted_scores |
(For development only.) If already computed: Vector of pre-sorted calibration nonconformity scores. |
The method argument specifies the conformalization method used to construct the (extreme) conformal prediction intervals (PIs).
The available method options are:
Recommended choice for extreme conformal prediction. Tries the method 'GPD_profile' first, and falls back to 'GPD_boot' if the former suffers from numerical instability.
GPD-based extreme conformalization using the profile-likelihood CI endpoint of the extreme score quantile. It captures the asymetric uncertainty of the score-quantile best, yielding the most reliable coverage. It might sometimes overcover or suffer from numerical convergence issues.
GPD-based extreme conformalization using the nonparametric bootstrap percentile CI endpoint of the extreme score quantile.
GPD-based extreme conformalization using the Delta method CI endpoint of the extreme score quantile.
The classical (non-extreme) conformalized quantile regression method, relying on the empirical quantile of the nonconformity scores.
Yields infinitely wide PIs if the coverage_proba is larger than 1-1/(length(y_calibr)+1).
A naive version of 'GPD_profile', without the alpha_correction for multiple testing.
Is likely to undercover, only use for comparison.
A naive GPD-based approach repeating the 'GPD_simple' method for a range of threshold levels, keeping the most conservative results.
Is likely to undercover, only use for comparison.
A naive GPD-based extreme conformalization using a simple extrapolated score quantile estimate instead of a CI endpoint. Is likely to undercover, only use for comparison.
(Not implemented) Extreme conformalization based on the Hill estimator from extreme value analysis.
See Pasche et al. (2026), referenced below, for the technical details of extreme conformal prediction.
A named list containing the following elements.
dQ |
The conformal correction |
coverage_proba |
The marginal coverage probability for the conformal PI. |
coverage_alpha |
The marginal coverage alpha level for the conformal PI. |
threshold_lvls |
The threshold level(s) effectively used for the GPD-based methods. |
method |
The |
dQ_thresholds |
A debugging vector of quantiles at the specified threshold levels. Only for GPD-based methods when |
sigma |
The GPD scale parameter estimate. Currently only for method 'GPD_simple', when |
xi |
The GPD shape parameter estimate. Currently only for method 'GPD_simple', when |
Pasche, O. C., Lam, H., and Engelke, S. (2026). "Extreme Conformal Prediction: Reliable Intervals for High-Impact Events." Extremes 29(2), 129–155. doi:10.1007/s10687-026-00536-9.