Train-Test-Val Split Game
Master the art of splitting data for reliable model evaluation
Your Progress
0 / 5 completed←
Previous Module
Gradient Descent Simulator
Why Split Your Data?
Imagine studying for an exam by memorizing all the questions and answers. You'd ace those exact questions but fail on new ones. That's why we split data - to test if our model truly learned patterns, not just memorized examples.
🎓 The Three Purposes
📚
Training Set
Learn patterns
Practice problems
60-80%
🎯
Validation Set
Tune hyperparameters
Practice exams
10-20%
✅
Test Set
Final evaluation
Real exam
10-20%
⚠️ What Happens Without Proper Splitting?
😱
Overfitting Goes Undetected
Model memorizes training data but fails on new data - you won't know until production!
📈
Overly Optimistic Results
Testing on training data gives 99% accuracy, real-world performance is 60%
🎰
Hyperparameter Overfitting
Tuning on test set means your hyperparameters are optimized for that specific data
💸
Wasted Resources
Deploy a model that performs poorly, requiring costly fixes and lost trust
🔑 The Golden Rules
1
Split your data BEFORE any preprocessing or feature engineering
2
Never let your model see the test set during training or tuning
3
Use validation set for hyperparameter tuning, not test set
4
Test set should only be used once - for final evaluation
5
Keep test set representative of real-world data distribution