Supervised learning is a type of machine learning in which a model learns from labelled examples, where each input is paired with the correct output, so it can predict the output for new inputs. It is called “supervised” because the labels act like a teacher, telling the model the right answer during training.
Key takeaways
- Supervised learning needs labelled data: inputs plus known answers.
- Its two main tasks are classification (categories) and regression (numbers).
- It is the most widely used type of machine learning in business.
- Labelling data is often the most expensive and time-consuming part.
Supervised learning explained in simple terms
Think of flashcards. The front shows a question, the back shows the answer. A student studies hundreds of cards, checks their guesses against the answers, and gradually gets better. Then they face new questions in an exam. In supervised learning, the data is the flashcard deck, the labels are the answers on the back, and the model is the student.
How does supervised learning work?
- Collect labelled data, such as house details with sale prices, or emails tagged as spam.
- Split it into training, validation and test sets.
- Train: the model makes predictions, a loss function measures the error, and an optimiser such as gradient descent adjusts the model.
- Tune settings on the validation set.
- Evaluate once on the test set to estimate real-world performance.
- Deploy and monitor predictions against real outcomes.
The two types of supervised learning
| Type | Output | Examples | Common metrics |
|---|---|---|---|
| Classification | A category | Spam or not, disease present or not, ticket type | Accuracy, precision, recall, F1 |
| Regression | A continuous number | House price, delivery time, sales volume | MAE, RMSE, R² |
Common supervised learning algorithms
- Linear regression: predicts numbers with a straight-line relationship.
- Logistic regression: a simple, explainable classifier despite its name.
- Decision trees: split data using yes/no questions.
- Random forests and gradient boosting (such as XGBoost and LightGBM): strong performers on tabular business data.
- Support vector machines: find the best boundary between classes.
- k-nearest neighbours: predicts based on the most similar past examples.
- Neural networks: best for images, audio and text.
Supervised vs unsupervised learning
Supervised learning has labels and a clear target to predict. Unsupervised learning has no labels and looks for structure, such as groups or unusual items. Supervised learning is easier to evaluate, because you can compare predictions with known answers. Unsupervised learning is useful when labels do not exist or are too costly to create.
Where labels come from
Labels can come from business records (did the customer pay?), human annotators (is this image a cat?), user behaviour (did they click?) or experts (is this scan normal?). Label quality matters as much as quantity. Inconsistent labels teach inconsistent behaviour. When labels are scarce, teams turn to semi-supervised or self-supervised learning.
Limitations
Supervised models only learn the patterns present in their labelled data. If labels are biased, outdated or wrong, predictions will be too. Models can also overfit, memorising training examples instead of learning general rules. And they cannot predict categories they were never shown.
