setup_CQR: Setup Conformalized Quantile Regression

View source: R/260_PredictionRegion.R

setup_CQRR Documentation

Setup Conformalized Quantile Regression

Description

Configure conformalized quantile regression for conformal.

Usage

setup_CQR(alpha = 0.1)

Arguments

alpha

Numeric (0, 1): Miscoverage rate. Also sets the quantile levels queried, alpha/2 and 1 - alpha/2.

Details

Split conformal adds and subtracts one number, so every case gets the same width whether the model is confident or not. CQR (Romano, Patterson and Candes, 2019) starts from the model's own alpha/2 and 1 - alpha/2 quantiles and conformalizes the pair with the score max(qlo - y, y - qhi), which widens or narrows both ends by one calibrated amount. Adaptive width, same finite-sample guarantee.

It needs a backend that answers a quantile query from the model already fitted. Today that is Ranger trained with setup_Ranger(quantreg = TRUE): a quantile regression forest keeps the training outcomes at its terminal nodes, so one fit answers every level. A gradient booster on the quantile objective targets the single level it was trained for, so a pair of bounds would be a pair of models – a training configuration, not something conformal() can do to a model it is handed.

It always needs calibration data. A Supervised stores its test predictions but not its test features, and CQR must query the model for quantiles at the calibration cases, so the stored-split default does not apply here.

Value

CQRConfig object.

Author(s)

EDG

Examples

setup_CQR()
setup_CQR(alpha = 0.05)

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.