πŸ”¬

Time-series cross-validation

climate

Definition

Evaluation that trains on earlier observations and tests on later ones, repeating this across a sequence of time windows.

Explanation

Keep future observations out of training and preprocessing. Window length, gaps and test horizon should reflect the prediction task. Ordered splitting alone does not prevent every form of leakage.

Examples

  • Hypothetical: train through December, test January; then extend training through January and test February.

Source

scikit-learn cross-validation documentation β†—