Supervised and unsupervised learning
Arthur Samuel's definition: the field of study that gives computers the ability to learn without being explicitly programmed. In practice: learn a mapping from data, then use it on new data.
Supervised learning: learn from right answers
You have inputs x and labelled outputs y. The model learns x → y.
| Kind | Output | Examples |
|---|---|---|
| Regression | a number, from infinitely many | house price, minutes to finish a course |
| Classification | a category, from a small set | spam or not, tumour benign or malignant, which digit |
Unsupervised learning: find structure without labels
| Kind | Does | Examples |
|---|---|---|
| Clustering | groups similar points | news stories on the same topic, customer segments |
| Anomaly detection | finds unusual points | fraud, a failing machine |
| Dimensionality reduction | compresses data, keeping what matters | visualizing, speeding up training |
Going further (interview level)
- Self-supervised learning (how large language models are pre-trained) makes labels from the data itself: hide a word, predict it.
- Semi-supervised: a few labels plus lots of unlabelled data.
- Reinforcement learning (part 3): learn from rewards, not labels.
Interview: "Is predicting tomorrow's temperature classification or regression? And whether it rains?" Regression; classification. "Can you turn a regression problem into a classification one?" Yes, by bucketing the output (cold/mild/hot), losing detail but sometimes making the problem easier or more useful.