🧷  Expanding Window Cross-Validation

Expanding Window Cross-Validation#

Time-series CV that grows the training window as it walks forward.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

Expanding-window cross-validation is a time-series scheme where the training set grows over time while the test set always takes the next period. The rule is the usual one — train on the past, predict the future — and crucially, once data enters training it stays in every later fold.

How it works#

Order the data chronologically, start from an initial training period, and validate on the next. Then expand the training window to absorb more past data and validate on the following period, repeating to the end of the series.

Example#

Over 2020–2024: train 2020 → test 2021; train 2020–2021 → test 2022; train 2020–2022 → test 2023; train 2020–2023 → test 2024. The training block keeps growing; the test always sits just after it.

vs the rolling window#

Both respect time order; they differ on memory. Expanding accumulates all history, which helps when older data is still relevant (finance, macroeconomic forecasting). The rolling/sliding window holds a fixed size and drops the oldest data, which helps when recent data dominates (stock trading, demand forecasting). The choice is really a question of whether the process is stationary.


Theme: Validation & Cross-Validation  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Expanding Window Cross-Validation (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate