R’s ahead 0.39.0 Adds Control Over Conformal Prediction Calibration Splits

Oct 18, 2026 825 views

Choosing how much historical data to reserve for calibration shapes the conformal prediction intervals produced by ahead::conformalize(). Version 0.39.0 of the R package adds split_prob, giving users direct control over that share. The parameter makes an important modeling choice explicit: how much data is used to assess forecast errors, and how much remains available to fit the forecasting procedure. That choice can affect the intervals readers see, so it belongs alongside the model and forecast horizon when comparing results.

Conformal prediction uses observed errors to construct intervals around forecasts. In a time-series setting, the calibration data must come from the historical series, which means allocating more observations to calibration can leave fewer for model fitting. The trade-off depends on the data and forecasting setup; there’s no single proportion that can be assumed to work best across every case. Here’s the thing: exposing the split as a parameter makes that trade-off easier to examine, but it doesn’t remove the need to check whether the resulting intervals are useful for the series at hand.

Compare splits across forecasting models

The examples apply the parameter to five built-in time series, using a 20-step forecast horizon. They compare calibration proportions of 0.3, 0.4, 0.6 and 0.7, then plot the resulting forecasts and intervals. That makes the split itself a practical tuning choice to inspect alongside the model and series. A plotted comparison can reveal whether the interval width or shape changes as more observations are reserved for calibration.

For USAccDeaths and AirPassengers, the examples use forecast::ets. The other three series—fdeaths, UKDriverDeaths and WWWusage—use ahead::dynrmf. Each call passes the selected series as y, sets h = 20L, and changes split_prob before plotting the result. Using two forecasting functions across five series gives readers a small set of comparisons, though it doesn’t establish how the parameter behaves for other models or data.

That setup offers a compact way to see how changing the calibration share affects interval behavior across different data and forecasting functions. The shown values are examples for comparison; the article doesn’t claim that one split is best for every series. This is more significant than it looks: a parameter that’s easy to vary can make an otherwise hidden assumption visible during model review. The numbers here are starting points, not a recipe.

And this is the part most people overlook: a visually wider interval isn’t automatically a better one. The plots help show what the allocation does, while judging forecast quality still calls for attention to how the intervals perform on the intended task. If you're working in this space, compare the alternatives on the series and horizon you care about, and treat the plot as evidence to inspect rather than a verdict.

Run the examples in R

Install the package from GitHub with pak, then load ahead. This gives the examples a reproducible starting point in an R session, assuming the required forecasting functions and datasets are available through the packages used below.

install.packages("pak")
pak::pak("Techtonique/ahead")
library(ahead)

For instance, this call applies exponential smoothing to USAccDeaths with a 40% calibration split and forecasts 20 steps. The returned object is then plotted, making the forecast and its intervals available for inspection.

obj <- ahead::conformalize(
  FUN = forecast::ets,
  y = USAccDeaths,
  h = 20L,
  split_prob = 0.4
)
plot(obj)

For practitioners, the useful change is the ability to vary the calibration proportion directly and inspect its effect on forecast intervals. Comparing several splits on the target series provides a concrete starting point for selecting a calibration setup. The choice still involves a trade-off between data used for calibration and data available to the forecasting process.

Why the calibration choice matters

The package update gives users a clearer handle on one component of conformal forecasting, while leaving the practical question of selection to the analyst. A proportion that produces sensible intervals for one series may behave differently on another, especially when the forecasting function or horizon changes. The examples make those comparisons approachable, but they don’t establish a universal default.

What this means for you is straightforward: use split_prob to make the allocation explicit, then compare the resulting intervals in context. The implementation offers a direct control. Whether a particular setting is appropriate remains an empirical question for the series being forecast.

Source: T. Moudiki · www.r-bloggers.com

Comments

Sign in to comment.
No comments yet. Be the first to comment.

Related Articles

Choosing the size of the calibration set in conformal pre...