EasyDeepLearn

How do you set up cross-validation for time series?

hard

Answer

  • Never random splits — that leaks future info into training.
  • Options: (1) walk-forward / rolling-origin: expand or slide a training window and evaluate on the next block.
  • (2) blocked / purged k-fold: keep folds contiguous in time and add a purge gap between train and validation to remove any labeled points near the boundary.
  • (3) time-series split with combinatorial purging + embargoes (Lopez de Prado) for financial data with overlapping labels.
  • Always check the last training timestamp precedes the first validation timestamp.
Check yourself — multiple choice
  • Random shuffled k-fold
  • Walk-forward / blocked / purged splits — respect time order, add gaps to prevent leakage
  • Only LOOCV works
  • Time series doesn't need CV

Walk-forward + purge/embargo blocks — never shuffle time-series data.

#cv#validation#time-series

Practise Supervised Learning

215 interview questions in this topic.

Related questions