Cross-validation
Step 9 of 21 in Machine Learning · Build · Easy
Split data into k folds; train on k−1 and test on the rest, rotating. Gives a more reliable score and is how you tune hyperparameters without touching the test set.
Build it
Leakage demo
Scale features before vs inside the CV loop on a small dataset; compare scores.
Done when: Leaky version scores higher; you explain why it is wrong.
Resources
- Wikipedia: Cross-validation (statistics) Article
- ISLR / ISLP (free book) Book
- StatQuest Video
- scikit-learn: model evaluation Article
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map