The Four Types of Machine Learning
Supervised Learning
3 min read
Learning with an answer key
A supervised learning method uses labeled data to predict outcomes, guided by specific input-output pairs. Both the inputs and the correct outputs are known ahead of time — the model's job is to learn the mapping between them well enough to handle inputs it hasn't seen before.
The word "supervised" describes exactly what's happening: a human (or a labeling process) has already decided what the right answer is for every example the model trains on.
A worked example: classifying fruit
Imagine training a model to classify images of apples, mangoes, and pears. Each training image comes with its correct label already attached — "apple," "pear," or "mango." The model studies thousands of these labeled images, gradually learning which visual patterns (shape, color, texture) correspond to which fruit.
Once trained, the model can look at a brand-new photo it's never seen — one with no label — and predict which category it belongs to. That's supervised learning in its simplest form: labeled examples in, a trained classifier out.
Back to ABC Inc.: fraud as a supervised problem
The fraud detection system from the start of this course is a real-world version of the same idea. ABC Inc. trains a model on thousands of past transactions, each one already labeled "fraudulent" or "legitimate" by human reviewers or confirmed chargebacks. The model learns which combinations of transaction size, timing, location, and account history tend to line up with fraud — then applies that learning to flag new, unlabeled transactions in real time.
Commonly used supervised learning algorithms
- Linear regression — predicts a continuous numeric value (like a price or a temperature) based on its relationship to other variables
- Logistic regression — despite the name, used for classification: predicting which of two categories something belongs to
- Support vector machines (SVMs) — find the clearest boundary that separates categories from each other
- Decision trees — make predictions by asking a sequence of yes/no questions about the input's features
Each of these is a different mathematical strategy for the same underlying goal: mapping labeled inputs to correct outputs.
More examples of supervised learning in practice
- Predicting temperature rise based on yearly temperature trends
- Sorting waste based on known waste items and their corresponding waste types
- Predicting crop yield based on seasonal crop quality changes
- Spam filtering — computers learn from labeled emails to decide whether new emails are spam or not
Notice the pattern across every one of these: historical examples with known correct answers, used to predict the answer for something new.
Key takeaway
Supervised learning trains on labeled data — every example paired with its correct answer — to learn a mapping it can then apply to new, unlabeled inputs. It's the backbone of common algorithms like linear regression, logistic regression, support vector machines, and decision trees, and it powers everything from fraud detection to spam filters to crop yield prediction.
What's next?
Supervised learning depends on having labels for every example — but what happens when you don't have any labels at all? That's where unsupervised learning takes over.