Supervised learning trains a model on examples where the correct answer is already attached. The model learns to map inputs to those known outputs.
The supervision is the labels. Show the model ten thousand emails already marked spam or not, and it learns the difference well enough to judge the ten thousand and first.
Think of it like this. Think of learning with flashcards. Question on the front, answer on the back. You are corrected every single time, which is exactly why it works.
How it works
- Start with labelled examples. Every input has the correct output attached.
- Predict, then compare. The model guesses, and a loss function measures how wrong it was.
- Adjust and repeat. Parameters shift to reduce that error across the whole dataset.
- Evaluate on data it never saw. Performance on the training set proves nothing on its own.
Types
- Classification. The answer is a category: spam or not, which of ten digits.
- Regression. The answer is a number: a price, a temperature, a duration.
- Semi-supervised. A small labelled set plus a large unlabelled one, used when labelling is expensive.
Common mistakes
- "High training accuracy means it works." It usually means it memorised. The number that matters comes from data the model has never seen.
- "Labels are a given." Labelling is often the most expensive part of the whole project, and label errors put a hard ceiling on accuracy.
- "The model learned why." It learned correlation. Nothing in the process establishes cause.