What is supervised learning?
Supervised learning is the form of machine learning in which the training data includes the right answer for every example. Each record pairs a set of inputs, called features, with a known outcome, called a label. The model learns the relationship between the two and then predicts the label for records where it is unknown.
The labels are what make it “supervised.” A model for predicting late shipments is trained on past orders where each order is tagged with whether it actually arrived late. The tag is the supervision. Most machine learning that runs in businesses today, from credit scoring to defect detection, is supervised.
How supervised learning works
Training begins with a labeled dataset, which is split into training, validation, and test portions. The model starts with arbitrary parameters and makes predictions on the training examples. A loss function measures how far those predictions fall from the true labels, and an optimization algorithm such as gradient descent adjusts the parameters to reduce the loss. This repeats over many passes through the data.
The validation set is used to tune choices such as model complexity and to stop training before the model memorizes the training examples, a failure called overfitting. The test set is touched once, at the end, to estimate real-world performance. If the test score is far below the training score, the model has not generalized and is not ready.
Types of supervised learning
| Task | What the label is | Example | Typical metrics |
|---|---|---|---|
| Binary classification | One of two categories | Whether an account will pay within 90 days | Precision, recall, AUC |
| Multiclass classification | One of several categories | Which department should handle a ticket | Accuracy, F1 score per class |
| Regression | A number | How many units a branch will sell next week | Mean absolute error, RMSE |
Algorithms for these tasks range from logistic regression and decision trees to gradient-boosted trees and deep neural networks. The task is defined by the label, while the algorithm is a separate choice made after the task is clear.
Supervised learning in practice
A network of outpatient clinics loses revenue to missed appointments. The team assembles two years of appointment records and labels each one as kept or missed. Features include lead time between booking and visit, time of day, visit type, distance from the clinic, and the patient’s history of prior no-shows. A gradient-boosted model is trained and evaluated on the most recent six months, which were held out. Appointments the model scores as high risk receive an extra reminder call, and a standby patient is lined up. Because the scheduling system changed midway through the two years, the team confirmed that the model performed equally well on records from both systems. The measured outcome is the no-show rate before and after, tracked per clinic.
What to watch for
- Labels cost money and carry opinions. If two reviewers would label the same record differently, the model will learn that inconsistency, so define the labeling rules first.
- Guard against information leakage, where a feature quietly encodes the answer, such as a “cancellation fee charged” field in a no-show model.
- Check class balance. When the outcome of interest is rare, a model that always predicts “no” scores high accuracy while being useless.
- Hold out data by time rather than at random when the process changes over time, so that the test mirrors how the model will be used.
- Budget for relabeling and retraining, because the relationship between features and outcomes drifts as the business changes.