Day 23 of 30Artificial Intelligence
🎓How Machines Learn
🎯 Today's objective
Understand data, features, labels, and train/test split.
📖 Key concepts
- Features = inputs (X); Label = answer (y)
- Training data teaches; test data checks
- Supervised vs unsupervised learning
- Overfitting = memorising, not learning
💻 Try this code
# Conceptual shapes
# X (features) y (label)
# [petal_len, width] -> "setosa"
# Split: train (learn) | test (grade honestly)👥 Learn it your way
🧒 Young Explorers
Like studying with practice questions (train) then sitting a real exam (test).
Your task
For "predict if it will rain", list 4 features and the label.
💼 Professionals
Never evaluate on training data; understand leakage and why a held-out test set matters.
Your task
Design the X/y and a train/test split for a churn-prediction problem.
🤖 AI connection
This vocabulary — features, labels, train/test, overfitting — is THE language of every ML project you’ll ever read or build.
✅ Quick check
Why keep a separate test set?
To check the model on data it has never seen — an honest grade.
What is overfitting?
Memorising training data instead of learning general patterns.