Quick Stats
Completed
0
Time Spent
0m
Streak
0
User
Supervised Learning
Learning from labeled data.
The setup
Most of the machine learning you'll meet — and almost every business application — is supervised learning. The idea is simple: you have examples where you already know the right answer, and you want a model that can produce the right answer for new examples it has never seen. You teach by example, the same way you'd teach a child to recognize fruit by showing labeled pictures.
Two pieces of vocabulary you'll use constantly:
- Features (X) — the inputs you measure. For a house: square footage, number of bedrooms, location.
- Label (y) — the answer you want to predict. For that house: the sale price.
The model's job is to learn the relationship between X and y well enough to predict y for a house it's never seen.
Two flavors
Supervised problems come in two kinds, separated by what the label looks like:
- Regression predicts a number on a continuous scale — price, temperature, demand, time-to-failure.
- Classification predicts a category from a fixed set — spam or not, which of five products, fraud or legitimate.
The same dataset can pose both: "how much will this house sell for?" is regression; "will it sell within 30 days?" is classification.
The real goal: generalization
Here's the subtlety that trips up beginners. We don't actually care how well the model does on the examples it learned from — we care how well it does on new data. A model that perfectly memorizes the training set but flubs new cases is worthless. What we're really after is generalization: capturing the pattern, not the examples.
Nearly every concept in this course — train/test splits, metrics, overfitting, regularization — exists to serve this one goal.
Supervised learning is pattern-matching with a grade key. The whole craft is getting a model to learn the underlying rule, not just parrot back the answers it was shown.
Try this: Pick a prediction you make intuitively — say, guessing a song's genre from its first few seconds. What features are you using (tempo, instruments, vocals)? What's the label? You're describing a classification problem, and the features you'd pick are exactly what a model would need.