Skip to main content
Step-by-step guide on using the ConformalSeasonalPool model in StatsForecast.
The Conformal Seasonal Pool (CSP) is a training-free probabilistic forecaster introduced in Manokhin (2026), Training-Free Probabilistic Time-Series Forecasting with Conformal Seasonal Pools. It produces a seasonal naive point forecast with empirically well-calibrated prediction intervals. It does this without estimating a single parameter, as the predictive distribution is built entirely from empirical draws of the training history. In the paper’s benchmark, CSP matches or beats deep probabilistic baselines such as DeepNPTS on CRPS while keeping empirical coverage close to the nominal level. It also runs orders of magnitude faster (seconds instead of hours) because there is nothing to train. In this notebook, we walk through the model on the UCI ElectricityLoadDiagrams20112014 dataset, the raw source of the electricity benchmark used in the paper, and mirrors the paper’s rolling-origin evaluation protocol to confirm that the intervals are calibrated.

How the model works

The point forecast is exactly a Seasonal Naive forecast μh\mu_h, which is the value observed one seasonal period ago. All of the model’s machinery goes into the predictive distribution around μh\mu_h. The distribution is estimated from n_samples draws of a two-component mixture.
  1. Seasonal pool. Historical observations at the same seasonal phase as the forecast target (e.g., all past 3 PM values when forecasting 3 PM), sampled with exponentially decaying weights eλage\propto e^{-\lambda \cdot \text{age}} so that newer observations are drawn more often (decay = λ\lambda).
  2. Calibration residuals. Signed seasonal naive errors rt=ytytmr_t = y_t - y_{t-m} computed on the most recent calib_frac fraction of the history and added back to the point forecast as μh+r\mu_h + r.
Each sample comes from the seasonal pool with probability ww and from the residual component with probability 1w1-w. The variant parameter controls ww.
  • "fixed" (CSP-Fixed) uses w=0.5w = 0.5 always.
  • "adaptive" (CSP-Adaptive) uses w=0w = 0 when there is no seasonality (season_length ≤ 1), w=0.3w = 0.3 when the seasonal pool is thin (fewer than 3 same-phase observations), and w=0.5w = 0.5 otherwise.
Prediction intervals are empirical quantiles of the samples with a finite-sample conformal correction. The lower cut uses (n+1)q/n\lfloor(n+1)q\rfloor/n and the upper cut uses (n+1)q/n\lceil(n+1)q\rceil/n, which orients the quantile estimates conservatively and helps keep empirical coverage close to the nominal level, even with a modest sample budget. Hyperparameters
ParameterDefaultMeaning
season_lengthRequiredObservations per seasonal cycle (24 for hourly data with a daily cycle).
n_samples100Mixture samples used to estimate the intervals. A level-LL interval needs at least 2/(1L/100)1\lceil 2/(1-L/100)\rceil - 1 samples (≥ 39 for 95%).
variant"adaptive""adaptive" or "fixed" mixture weight (see above).
calib_frac0.5Fraction of the most recent history used for the calibration residual pool.
decay0.01Exponential recency rate for the seasonal pool weights.
When to use CSP? Strongly seasonal series where you need calibrated prediction intervals at essentially zero computational cost, for example as a probabilistic baseline before reaching for heavier models, or in large-scale settings where per-series training is too expensive.

Loading libraries and data

Tip You need StatsForecast to run this notebook. To install it, follow these instructions.

Download the electricity dataset

We use the ElectricityLoadDiagrams20112014 dataset from the UCI Machine Learning Repository, which contains the electricity consumption (kW) of 370 Portuguese clients, recorded every 15 minutes from 2011 to 2014. This is the raw source behind the hourly electricity benchmark on which the CSP paper is evaluated.
Warning The zip file is about 250 MB. The cell below caches it locally, so it is only downloaded once.
The file is semicolon-separated with decimal commas. Each timestamp marks the end of a 15-minute interval, so we aggregate to hourly totals (the convention used by the GluonTS electricity benchmark). To keep the notebook fast we work with ten clients over the last three months of 2014, keeping only clients that are active (non-zero) throughout the window, since some clients joined after 2011 and their earlier readings are recorded as zero.
dsunique_idy
02014-10-01 00:00:00MT_00292.46
12014-10-01 01:00:00MT_00279.66
22014-10-01 02:00:00MT_00277.52
220772014-12-31 21:00:00MT_012727.66
220782014-12-31 22:00:00MT_012691.49
220792014-12-31 23:00:00MT_012665.96

Explore the data

The hourly load shows the strong daily seasonality that CSP exploits.

Forecasting with prediction intervals

We instantiate ConformalSeasonalPool alongside SeasonalNaive and forecast the next day (h=24) with 80% and 95% prediction intervals. The default n_samples=100 comfortably exceeds the minimum number of samples required for non-degenerate 80% and 95% intervals. Note that CSP requires no training, so forecast returns almost instantly.
unique_iddsCSP-AdaptiveCSP-Adaptive-lo-95CSP-Adaptive-lo-80CSP-Adaptive-hi-80CSP-Adaptive-hi-95SeasonalNaiveSeasonalNaive-lo-80SeasonalNaive-lo-95SeasonalNaive-hi-80SeasonalNaive-hi-95
0MT_0022015-01-01 00:00:0078.9565.3875.3281.7994.0278.9569.0563.8188.8594.09
1MT_0022015-01-01 01:00:0073.2660.4668.8579.7983.9473.2663.3658.1283.1688.40
2MT_0022015-01-01 02:00:0068.9958.2966.0775.3991.0468.9959.0953.8578.8984.13
237MT_0122015-01-01 21:00:00727.66569.32637.23812.77936.60727.66589.71516.69865.61938.63
238MT_0122015-01-01 22:00:00691.49482.98595.53783.36951.49691.49553.54480.52829.44902.46
239MT_0122015-01-01 23:00:00665.96435.57553.19721.66910.26665.96528.01454.99803.90876.93
The point forecast of CSP is exactly the seasonal naive forecast, and the value the model adds is the calibrated intervals around it:

Evaluating calibration with the paper’s protocol

The paper evaluates each method with a rolling-origin protocol using 7 non-overlapping evaluation windows per series, each one day long (h=24). StatsForecast.cross_validation implements exactly this. We request the levels [20, 40, 60, 80], whose interval bounds correspond to the quantile grid q{0.1,0.2,,0.9}q \in \{0.1, 0.2, \ldots, 0.9\} used by the paper’s CRPS and quantile-loss metrics, plus level 95 for the coverage check.
unique_iddscutoffyCSP-AdaptiveCSP-Adaptive-lo-95CSP-Adaptive-lo-80CSP-Adaptive-lo-60CSP-Adaptive-lo-40CSP-Adaptive-lo-20SeasonalNaive-lo-20SeasonalNaive-lo-40SeasonalNaive-lo-60SeasonalNaive-lo-80SeasonalNaive-lo-95SeasonalNaive-hi-20SeasonalNaive-hi-40SeasonalNaive-hi-60SeasonalNaive-hi-80SeasonalNaive-hi-95
0MT_0022014-12-25 00:00:002014-12-24 23:00:0079.6681.7972.5075.3976.8176.8177.9579.8377.7475.2871.8866.6383.7585.8588.3091.7096.95
1MT_0022014-12-25 01:00:002014-12-24 23:00:0081.0872.5566.0968.2869.7069.7071.1270.5968.4966.0462.6357.3974.5176.6079.0682.4687.70
2MT_0022014-12-25 02:00:002014-12-24 23:00:0076.1068.2855.8562.5966.8666.8666.8666.3264.2261.7758.3753.1270.2472.3374.7978.1983.44
1677MT_0122014-12-31 21:00:002014-12-30 23:00:00727.66806.38597.53634.47696.60761.70768.09779.07749.86715.66668.24595.11833.69862.91897.11944.531017.66
1678MT_0122014-12-31 22:00:002014-12-30 23:00:00691.49744.68550.21616.17653.19666.17716.17717.37688.15653.96606.54533.41771.99801.21835.40882.83955.96
1679MT_0122014-12-31 23:00:002014-12-30 23:00:00665.96661.70468.09553.19592.77608.51640.85634.39605.17570.98523.56450.43689.01718.23752.43799.85872.98
Note the wall-clock time above. The full 7-window evaluation of both models over ten series runs in about a second on CPU, matching the training-free speed the paper reports, while its deep baseline needs hours for the same protocol. We now compute the paper’s metrics with utilsforecast.
  • Scaled CRPS and mean quantile loss over q{0.1,,0.9}q \in \{0.1, \ldots, 0.9\} are the headline distributional accuracy metrics.
  • Empirical 95% coverage is the fraction of observations inside the 95% interval, which should be close to 0.95 for a calibrated model.
  • Mean 95% interval width measures the sharpness of the intervals.
CSP-AdaptiveSeasonalNaive
metric
mqloss22.6628.77
scaled_crps0.100.13
CSP-AdaptiveSeasonalNaive
metric
coverage_level950.930.84
mean 95% interval width306.75257.12
The results mirror the paper’s findings: CSP’s empirical 95% coverage is close to the nominal level (the paper reports a mean of 0.89 across its six datasets), while the parametric Gaussian intervals of SeasonalNaive undercover noticeably. All of this comes from a model with zero trained parameters that evaluates in a fraction of a second.

Fixed vs. adaptive variant

With variant="fixed", the mixture weight is always w=0.5w=0.5. The adaptive variant only deviates from this when seasonality is absent (season_length ≤ 1) or the seasonal pool is thin. On a series this long, the two variants behave identically. To see the adaptive rule act, we now forecast from a short history of two and a half days. Each hour of the day has been observed at most 3 times, and the adaptive rule shrinks the seasonal pool’s weight to 0.3, leaning more on the calibration residuals.
mean 95% width
CSP-Adaptive31.06
CSP-Fixed29.96
On this well-behaved series, the resulting widths are similar because the two sampling pools happen to agree. The adaptive safeguard matters when they don’t. With only a couple of same-season observations, a single outlier in the seasonal pool can distort the intervals, and down-weighting the pool keeps them stable. If in doubt, keep the default variant="adaptive", as it reduces to the fixed rule whenever the history is rich enough.

References