Mental model
Time-series forecasting predicts future observations from information that would actually be available at a defined forecast origin. Reliable evaluation preserves that time boundary, compares against seasonal baselines, and reports uncertainty alongside point error. A model is useful only when its forecast horizon, data cadence, and loss measure match the decision it will guide.
Learning outcomes
- Construct rolling-origin backtests that prevent future values and future-fitted preprocessing from leaking into training.
- Calculate seasonal-naive forecasts and mean absolute scaled error for a fixed horizon.
- Explain how Chronos turns normalized observations into tokens and produces probabilistic forecasts.
- Choose forecast intervals and operational checks that reflect the cost of under- and over-prediction.
Theory
A time series is an ordered sequence y_1, y_2, …, y_T observed at a declared cadence. A forecast made at origin T for horizon h estimates y_{T+h} using only the information set available by T. That information set may include lagged demand, known future calendar features, and covariates whose publication schedule is trustworthy. A promotion plan uploaded after the forecast origin is not a valid feature, even if it is later attached to every historical row.
Before choosing a model, write down the cadence, forecast horizon, update schedule, and target definition. If a warehouse forecasts daily unit sales seven days ahead, weekly seasonality makes the seasonal-naive estimate ŷ_{T+h}=y_{T+h-7} a meaningful baseline. For multiple seasonal cycles, the forecast repeats the last observed week. It is inexpensive, easy to explain, and often difficult to beat on stable retail demand. A complex model that cannot exceed this baseline on untouched origins has not demonstrated value.
Randomly splitting timestamped rows leaks temporal structure: training can contain observations from after the validation window, and overlapping windows can place nearly identical future periods on both sides of the split. A rolling-origin backtest instead selects successive cutoffs. At each cutoff, fit or update from the past, predict the next operational horizon, then advance the cutoff. Fit scalers, imputers, feature selectors, and learned encoders inside each training window. Use only calendar data and plans that would have been known at that cutoff. Keep the final period untouched until model selection is finished.
Raw mean absolute error is measured in target units, so it is useful for staffing or inventory budgets but cannot be compared directly across series with different scales. Mean absolute scaled error divides a model's mean absolute forecast error by the average in-sample seasonal-naive error:
Here H is the forecast horizon in days, T is the number of training observations, m is the seasonal period in days, y is observed demand in units per day, and ŷ is the model forecast in the same units. Compute the denominator from the training window only. A score below one means the model's error is lower than that training-window seasonal scale; it does not replace a direct held-out comparison against the seasonal-naive forecast. If the training series is constant, the denominator is zero and MASE is undefined, so use another declared metric rather than dividing by an arbitrary epsilon.
For a concrete weekly-demand example, suppose the training seasonal-naive scale is two units per day. A seven-day model forecast has absolute errors of one unit on each day, giving a forecast MAE of one unit per day and MASE = 1 / 2 = 0.5. The value is scale-normalized; the one-unit error still matters when deciding how much reserve inventory to hold. Compare forecast and seasonal-naive errors over the same cutoffs, horizon, and target revisions.
Chronos addresses a different modeling choice. The original Chronos work scales and quantizes time-series values into a fixed token vocabulary, then trains a Transformer to model the token sequence. At inference, sampled future token sequences can represent a forecast distribution rather than one deterministic point. That makes the model useful when uncertainty matters, but a set of samples is not automatically a calibrated interval for every new industry or horizon. Validate coverage and quantile loss on the target series before turning samples into reorder points or staffing buffers.
Trade-offs
Global models can share statistical strength across many related series, but a pooled training objective may hide a weak segment behind high-volume items. Report metrics by product family, location, horizon, and demand regime as well as an aggregate. Intermittent items with long runs of zero demand need different interpretation from smooth sensor readings; a percentage error can become unstable near zero. MASE or a cost-weighted pinball loss gives more useful comparisons when selected to match the planning decision.
Point forecasts are compact and cheap to consume. Quantile forecasts expose asymmetric risk: a retailer facing stockout penalties can choose a higher demand quantile, while a perishable-goods planner may prefer a lower one. The chosen quantile must be checked for empirical coverage by horizon and segment. If the 90th percentile is exceeded much more than ten percent of the time, the interval is miscalibrated even when average MAE looks strong.
Failure modes and misconceptions
- Random row splits: They can train on the future and produce optimistic metrics. Split at chronological origins and preserve the production horizon.
- Future-fitted transforms: Centering or imputing with the full dataset leaks later information. Refit every learned transform within each origin's training window.
- One aggregate score: A high-volume series can mask poor forecasts for sparse or newly launched items. Publish segment-level errors and sample counts.
- Misread MASE: It is undefined when the training seasonal scale is zero and says nothing about decision cost by itself. Report the denominator and compare against the held-out baseline.
- Assuming samples are calibrated: Generative forecast paths can be sharp yet miss actual coverage after a regime change. Measure interval coverage and quantile loss on recent, time-ordered data.
- Stale or revised targets: Late-arriving transactions and backfills can change the history used for training. Version source snapshots and evaluate against the same target definition used in production.
Decision scenario
A grocery team forecasts daily demand for 4,000 items at each store, seven days ahead. The proposed Chronos fine-tune reduces pooled MAE by eight percent, but two new product families have only five weeks of history and no reliable holiday flag. The existing seasonal-naive model remains the replenishment baseline. Run rolling origins that include the most recent holiday period, score each family and horizon separately, and measure both MASE and the cost of stockouts versus spoilage. For the cold-start families, keep a conservative baseline or category-level fallback until interval coverage and service levels are demonstrated. Promote the model only for segments where its held-out benefit persists and the upper-demand quantile meets the agreed availability target without exceeding waste limits.
Implementation pattern
This small evaluator compares a trend-adjusted seasonal forecast against a seven-day holdout and reports its MASE scale. The history contains two weekly cycles with a mean seasonal-naive change of two units. The holdout is supplied separately, as it would be after a forecast origin; no future value is used to fit the forecast.
pythonimport numpy as npdef trend_adjusted_seasonal_forecast(history, season, horizon):if season <= 0 or horizon != season or len(history) < 2 * season:raise ValueError("need two seasons and a one-season forecast horizon")previous = history[-2 * season : -season]latest = history[-season:]seasonal_change = np.mean(latest - previous)return latest + seasonal_changedef mase(history, actual, forecast, season):scale = np.mean(np.abs(history[season:] - history[:-season]))if scale == 0:raise ValueError("seasonal-naive scale is zero; MASE is undefined")return np.mean(np.abs(actual - forecast)) / scalehistory = np.array([10, 12, 14, 16, 18, 20, 22, 12, 14, 16, 18, 20, 22, 24])actual = np.array([15, 15, 19, 19, 23, 23, 27])forecast = trend_adjusted_seasonal_forecast(history, season=7, horizon=7)score = mase(history, actual, forecast, season=7)print(f"forecast={forecast.tolist()}, MASE={score:.2f}")