🧷  Time-based splits (a.k.a. Temporal Cross-Validation, Rolling Window Validation)

Time-based splits (a.k.a. Temporal Cross-Validation, Rolling Window Validation)#

Validation that respects time order to avoid using the future to predict the past.

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#

A time-based split orders data by time and trains on the past while validating and testing on the future — the earliest records for training, the most recent held out. It reproduces the reality of deployment, where future data doesn’t exist at training time.

Why it’s needed#

Time-series data violates the i.i.d. assumption behind ordinary splitting — observations depend on prior ones. Shuffling or random k-fold would let the model train on the future to predict the past, a temporal leakage that badly overstates accuracy.

How it’s done#

Schemes like a rolling forecasting origin (walk-forward) or an expanding / sliding window repeatedly move the training window forward in time, so every evaluation always predicts later data than it trained on. Look-ahead features must be avoided too.


Theme: Validation & Cross-Validation  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Time-based splits (a.k.a. Temporal Cross-Validation, Rolling Window Validation) (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate