Cross-validation
Cross-validation tests a model by repeatedly fitting it on one part of the data and scoring it on another, then averaging the scores.
Last reviewed
The textbook version shuffles rows into random folds. That breaks with time series, where it lets the model peek at the future. The time-series version keeps the order: train on the first stretch, test on the next, extend, repeat.
- Also called
- Time-series cross-validation
- Topic
- Model quality and Bayesian methods
Related terms
- Holdout validation
- Holdout validation sets aside part of the data, fits the model on the rest, and checks how well the model predicts the part it never saw.
- Backtesting
- Backtesting replays history: you fit the model using only data up to a past date, forecast the following period, and compare the forecast with what actually happened.
- Overfitting
- Overfitting is when a model learns the random noise in its training data as if it were real pattern, so it fits history closely and predicts new data badly.
- Time series
- A time series is a set of measurements taken at regular intervals over time, such as weekly sales or daily spend.
Want a second opinion?
Tell us what you're trying to decide and what data you have, and we'll tell you what we'd do. Or take the short readiness quiz first. It's a rough screen, not a verdict. Both open on the home page.