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

  1. 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

Earn this star

On the map, you log what you built. Finish the step and its star lights.

Open this step on the map