Skip to main content
StatsForecastAdapter is the most capable adapter in the package: it is the only one whose support for every capability is unconditional, so all six methods work behind it whatever model you wrap. NeuralForecastAdapter declares the same set, but its quantile support depends on the model’s loss.

Fit first, wrap second

The adapter does not fit anything. Build and fit your StatsForecast object exactly as you normally would, then hand it over along with the frame it was trained on as the adapter needs that to reconstruct histories at the right frequency.
model_name picks one column out of the fitted output. One adapter speaks for one model, so wrapping the same sf twice conformalizes two of its models independently.
One caveat on sharing a multi-model StatsForecast Cross-validation runs at the StatsForecast level, not per column. If the object holds several models and any of them lacks a forward method, refit=False fails for all of them — even for an adapter that only reads the AutoETS column. That is why this page builds a second StatsForecast below rather than adding SeasonalNaive to the one above.

Calibrating

refit depends on the model, not on you calibrate_cv(refit=False) — the default — asks statsforecast to reuse fitted parameters across cutoffs via each model’s forward method. AutoETS has one, so the call above is fast. SeasonalNaive does not, and statsforecast raises ValueError: ... The following models do not implement the forward method — pass refit=True for those.

Polars frames

The adapter takes a polars train_df just as well, and conformalforecast installs neither library. Pass the same freq you gave StatsForecast; for polars that is a polars interval, "1h", rather than the pandas alias "h". Every frame the adapter hands StatsForecast stays polars, and the calibrated quantile matches the pandas run.

Per-series intervals

Eight series, eight scales — and each band is calibrated on that series’ own residuals. Nothing here is a global multiplier.

Quantiles, and CQR

StatsForecastAdapter exposes statsforecast’s analytical prediction intervals as quantiles, which is what makes CQR available.
Two rules statsforecast imposes on quantiles
  • Symmetric pairs only. Quantiles are requested through statsforecast’s level API, so 0.05 must be accompanied by 0.95. Asking for an unpaired quantile raises ValueError in the adapter. This is shared with the mlforecast and neuralforecast adapters, so asymmetric CQR (symmetric=False) is out of reach for all three — see CQR for the detail.
  • No median. q == 0.5 is rejected; the level API has no column for it.
alpha is translated into a legal pair for you, so you only meet these rules if you specify levels by hand.

Exogenous regressors

An exog_features argument tells the adapter which columns of train_df are regressors rather than the target.
Declaring exog_features removes the quantile capability This is the package’s canonical example of a capability that depends on configuration rather than on class. StatsForecastAdapter overrides supports(): with exogenous regressors declared, predict_quantiles cannot be served, so SupportsQuantiles reports False and calibrating CQR on that adapter raises UnsupportedCapability as soon as it is bound, before any forecasting happens. Note also that the exogenous predict path is a known gap in v0.1 (it is xfail-marked in the integration suite). See Exogenous features for what does work today.

Measured coverage across the panel

Three things worth reading off that table. SeasonalNaive produces intervals nearly three times narrower than AutoETS for two points less coverage, and a Winkler score a third the size. On strongly periodic hourly data the naive seasonal forecast is simply more accurate, and conformal prediction inherits that: a better point forecast is the cheapest way to a narrower interval, and no amount of calibration will rescue a poor one. CQR comes out worse than split conformal here on all three numbers — 80.3% against 87.4%, wider, higher Winkler. CQR inherits the shape of the model’s own quantiles, and AutoETS’s analytical band on an hourly series with a 24-hour season is a poor guide to where the errors actually fall. Conformal calibration can shift that band up or down; it cannot reshape it. Inheriting a shape is only an advantage when the shape is right. And the per-series breakdown spans 69.8% to 100% around an 87.4% marginal. The two worst are H150 and H400, and the panel-level number tells you nothing about them — see ragged panels for why per-series diagnostics are the ones to watch.

Next

  • MLForecast — the same panel through a gradient-boosted model.
  • NeuralForecast — and through a neural one.
  • Adapters — the capability matrix and how to write your own.
  • Methods — all six work behind this adapter.