View source: R/260_PredictionRegion.R
| setup_CQR | R Documentation |
Configure conformalized quantile regression for conformal.
setup_CQR(alpha = 0.1)
alpha |
Numeric (0, 1): Miscoverage rate. Also sets the quantile levels
queried, |
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.
CQRConfig object.
EDG
setup_CQR()
setup_CQR(alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.