
Fit a horizon-specific conformal regressor for time series forecasting.
Source:R/fit_conformal_reg.R
conformalRegressorByHorizon.RdThis function creates a conformal regressor that accounts for increasing uncertainty at longer forecast horizons. It uses separate nonconformity score distributions for each horizon h=1,2,3,..., resulting in prediction intervals that naturally widen as the forecast horizon increases (trumpet-shaped intervals).
Arguments
- horizon_errors
A named list where each element contains sorted absolute errors for that horizon. Names should be "h1", "h2", etc. This is typically produced by
calibrate_horizon_scores().
Value
A conformalRegressorByHorizon object containing:
- alphas_by_horizon
List of sorted nonconformity scores for each horizon
- max_horizon
Maximum calibrated horizon
- n_samples
Number of calibration samples per horizon