Supervised Learning: the ML paradigm where someone diligently labeled things beforehand.
Fundamentals 8 min Beginner May 18, 2026
When you study with flashcards, you already know the answer on the back before you flip — that is the core principle of supervised learning. The machine sees thousands of such flashcards (data with correct answers) and learns to predict the answer for cards it has never seen before.
In the previous article you learned that ML models learn from data instead of following explicit rules. Now we look at the most common form of that learning: supervised learning, where every training example comes with a correct answer attached.
Features & Labels — The Raw Material
Feature & Label
AnalogyDefinition
Think of flashcards: the front shows a picture (features), the back shows the correct name (label). You study hundreds of cards until you recognize patterns. The model learns from many examples with known answers in exactly the same way.
Analogy:
Think of flashcards: the front shows a picture (features), the back shows the correct name (label). You study hundreds of cards until you recognize patterns. The model learns from many examples with known answers in exactly the same way.
Definition:
Features are the measurable input properties of a data point (e.g., house area, number of rooms, year built). Labels are the correct answers a human provides for each data point (e.g., house price). The model learns the mapping f(features) → label. "Supervised" means there is a teacher (the labels) who tells the model the correct answer for every training example.
The flashcard analogy has a productive side-effect: you might think the model eventually memorizes the cards. That is actually a real problem — it is called overfitting, and we will come back to it shortly.
Concrete example: A spam filter is trained on 10,000 emails. Features are word frequencies, sender domain, and link count. Labels: "spam" or "not spam" (assigned by humans). The model sees 8,000 labeled emails during training and must correctly classify the remaining 2,000 it has never seen.
Deep Dive: Label Noise — When the Teacher Makes Mistakes
Labels are not always correct. Human annotators sometimes disagree, make mistakes, or apply inconsistent criteria. For a spam filter, one annotator might mark a newsletter as spam while another does not.
A model trained on noisy labels learns the teacher's errors as if they were correct patterns. The quality of labels determines the ceiling of model performance just as much as their quantity.
Interactive: Feature-Label Mapping
In the spam filter example above, you saw how features and labels work together. Here you can try for yourself how three email features affect the prediction.
Feature-Label Mapping
Three features of an email determine whether it is classified as spam. Move the sliders and observe how the prediction changes.
3
2
Calculation:3×2 + 2×3 − 0 = 12
Prediction
Spam
Score 12 > 7 (Threshold)
Classification vs. Regression — Two Flavors of Prediction
Depending on the type of label, supervised learning tasks fall into two fundamental categories. The distinction is determined entirely by the nature of the label — not by the features.
Classification
Predicts discrete categories — like a sorting machine that asks: "Which bin does this belong to?" Examples: spam/not-spam, cat/dog/bird, benign/malignant.
Regression
Predicts continuous numerical values — like a scale that asks: "How much does this weigh?" Examples: house price in euros, temperature in degrees, stock price.
Spam Filter Classification
Diagnosis Classification
House Price Regression
Weather Regression
Image Recognition Classification
Stock Price Regression
Same dataset, different questions: With patient data, the question "Is the tumor benign or malignant?" becomes classification (label is 0 or 1). The question "How large will the tumor be in six months (in mm)?" becomes regression (label is a continuous measurement). Same features, different label type, completely different ML approach.
Gray area: A product rating (1–5 stars) can be treated as regression ("predict 4.2 stars") or as 5-class classification. The choice depends on whether the distance between 3 and 4 stars matters as a metric.
Interactive: Supervised vs. Unsupervised vs. Semi-Supervised
Supervised learning is just one of three major learning paradigms. The Venn diagram shows how they overlap and what hybrid forms exist.
👆Click on a region to see the differences between learning paradigms.
Click on a region
Click on one of the circles or intersections to find out which learning paradigm belongs there and what it means.
The Supervised Learning Workflow
Supervised learning follows a fixed five-step pipeline. The most important safeguard: the train-test split.
1
Collect & label data
2
Split: ~80% training, ~20% test
3
Choose & train a model
4
Evaluate on test data
5
Deploy model (inference — applying the model to real, new data)
Think of exam preparation: you practice with exercises (training set), but the real exam (test set) contains problems you have never seen. If you only memorized the practice answers without understanding the underlying principles, you fail the exam. That is overfitting.
Don't worry, you don't need to be able to code — this just shows how short the workflow is in practice. In Python with scikit-learn:
Python Example: Supervised Learning in 6 Lines
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.datasets import load_diabetes
X, y = load_diabetes(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
model = LinearRegression().fit(X_train, y_train)
print(f"Test Score: {model.score(X_test, y_test):.2f}")
Line 5 loads data with features (X) and labels (y). Line 6 splits 80/20. Line 7 trains a linear regression model. Line 8 evaluates it on the unseen test data.
Common Misconceptions
"Labels are always correct." — In reality, label noise is a real problem. Annotators make mistakes, and the model learns these mistakes as patterns.
"More data always helps." — More bad labels make the model worse. Quality beats quantity.
"The boundary between classification and regression is always clear." — Star ratings (1–5) can be treated as either.
Deep Dive: Transfer Learning — Do You Always Need Millions of Examples?
Transfer learning allows you to take a model pre-trained on millions of examples and fine-tune it on just a few hundred labeled data points for a new task. The pre-trained model has already learned general patterns (e.g., edges and textures for images), so only the final decision layer needs to be retrained.
Practical example: A company has only 200 labeled images for product recognition. With a model pre-trained on ImageNet (millions of images), these 200 examples are sufficient to train a working classifier.
2009 Datasets
ImageNet: The Dataset That Changed Everything
The creation of the dataset that made Deep Learning possible. In 2009, Fei-Fei Li and her team presented the ImageNet paper, introducing a visual database that would transform computer vision — at launch it contained around 3.2 million hand-annotated images in approximately 5,200 categories. Expanded to its full size, ImageNet later comprised over 14 million hand-annotated images and around 22,000 categories, based on WordNet hierarchies, addressing the critical bottleneck: the shortage of large, high-quality training data. Annotation was carried out throughout the project by around 49,000 workers from 167 countries via Amazon Mechanical Turk — an unprecedentedly collaborative effort. What began as a poster in a corner of a Miami Beach convention center grew into the annual ImageNet Challenge (ILSVRC) and became one of the three drivers of modern AI development. ImageNet enabled AlexNet's 2012 breakthrough and laid the foundation for autonomous vehicles, facial recognition, and medical imaging.
Key Takeaways
Supervised learning needs labeled data — features (input) paired with labels (correct output). Without labels, the model has no teacher.
Classification predicts categories (spam/not-spam), regression predicts numbers (house price in euros). The same data can serve both depending on the question asked.
The train-test split is the single most important safeguard: a model that only performs well on data it has already seen (overfitting) is useless in the real world.
Quiz: Supervised Learning
Question 1 / 6
Not completed
What is a "label" in a supervised learning dataset?
1. What is a "label" in a supervised learning dataset?
☐ A) A column name in the data table
☐ B) The correct answer provided for each training example
☐ C) The algorithm used for training
☐ D) A category of the model type
2. A hospital wants to predict whether a patient has diabetes (yes/no) based on blood tests. What type of supervised learning task is this?
☐ A) Regression, because blood values are continuous numbers
☐ B) Classification, because the prediction is one of two categories
☐ C) Unsupervised learning, because the model discovers patterns
☐ D) Reinforcement learning, because the model gets feedback
3. A real estate company has data on 5,000 apartments (size, floor, location) with their sale prices. They split the data 80/20. The model scores 0.99 on training data but only 0.45 on test data. What is the most likely problem?
☐ A) The test set is too small
☐ B) The features are wrong
☐ C) The model has overfitted — it memorized training data instead of learning generalizable patterns
☐ D) The labels contain no useful information
4. An online shop has product ratings from 1 to 5 stars. A developer wants to predict ratings for new products. She could treat this as classification (5 classes) or regression (predict a number). Which consideration is most relevant?
☐ A) Classification is always more accurate than regression
☐ B) If the difference between 3 stars and 4 stars matters as a distance (not just a category), regression is more appropriate
☐ C) Regression cannot handle discrete values
☐ D) Classification requires more training data than regression
5. A team trains a spam filter on 10,000 emails. They discover that 500 emails were incorrectly labeled (spam marked as not-spam and vice versa). What is the most accurate description of the impact?
☐ A) It has no effect because 500 out of 10,000 is negligible
☐ B) The model will learn some of the annotators' mistakes as if they were correct patterns, reducing its real-world accuracy
☐ C) The model will automatically detect and correct the wrong labels
☐ D) Only the test set accuracy is affected, not the model itself
6. A company has only 200 labeled images but needs an image classifier. A colleague suggests transfer learning with a model pre-trained on millions of images. Why can this work despite the small dataset?
☐ A) Transfer learning does not use labels at all
☐ B) The pre-trained model has already learned general visual features (edges, textures, shapes), so only the final classification layer needs to be trained on the 200 images
☐ C) 200 images are actually enough for any model if the features are good
☐ D) Transfer learning is just another name for data augmentation
Answer Key: 1) B · 2) B · 3) C · 4) B · 5) B · 6) B
Comprehension Check
Why does a supervised learning model absolutely need labels?
How do you determine whether a problem should be solved with classification or regression?
Why is the train-test split so important — and what happens if you skip it?