Artificial intelligence · lesson 4 of 4
Cross-validation, grouped data and time-aware splits
A k-fold procedure rotates held-out folds to estimate performance for a specified training process. Splits and all fitted preprocessing must be controlled.
Learn the ideas
Prerequisites: Training/validation concepts and averages.
Cross-validation
A k-fold procedure rotates held-out folds to estimate performance for a specified training process. Splits and all fitted preprocessing must be controlled.
Grouped records
When multiple records share a person, device or source, the split should match whether deployment encounters new or known groups.
Time series
Forecast evaluation must respect time order. Training on future information while predicting earlier records creates a misleading task.
Nested choices
Using the same folds for extensive tuning and final performance reporting can produce optimistic estimates. Separate outer evaluation or a final untouched test can help.
Worked examples
A 100-record dataset is divided equally into 5 folds. How many records are in one held-out fold?
100/5=20.
20
Three fold scores are 0.7,0.8,0.9. Find their arithmetic mean.
(0.7+0.8+0.9)/3=0.8.
0.8
Check your understanding
8 questionsDecimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.