Types of Machine Learning
The three paradigms of machine learning — supervised, unsupervised, and reinforcement learning — and how the data you have decides which one to use.
Artificial Intelligence · Lesson 3
The three paradigms of machine learning — supervised, unsupervised, and reinforcement learning — and how the data you have decides which one to use.
Machine learning is not one technique but a family of them, and the first practical decision anyone makes is which kind of learning the problem calls for. Choosing wrongly wastes effort: you cannot train a spam filter without labelled examples of spam, and you cannot discover natural customer groups if you have already decided what the groups are. Knowing the three paradigms — supervised, unsupervised, and reinforcement learning — lets you recognise, before writing a line of code, what data you need, what the system can learn, and what it will never be able to tell you. It is the difference between asking a question the data can answer and one it cannot.
Supervised learning trains on labelled examples — inputs paired with the correct answers. Show a model thousands of images tagged "cat" or "dog," and it learns to predict the label for images it has never seen. Two flavours matter. Classification predicts a category (spam or not, cat or dog, fraud or legitimate). Regression predicts a number (tomorrow's temperature, a house price). Both need a teacher: something must supply the right answers first.
Unsupervised learning receives inputs with no labels and looks for structure on its own. The commonest job is clustering — grouping items that resemble each other. A retailer with millions of customers and no predefined categories can let the algorithm surface natural segments: bargain hunters, loyalists, one-time buyers. Nobody told it those groups existed; it found them in the shape of the data. The catch is that it cannot tell you what a cluster means, only that it exists.
Reinforcement learning has no fixed dataset at all. An agent acts in an environment, receives rewards or penalties, and adjusts to earn more reward over time. It learns by trial and error, the way you learn a game by playing it. This suits problems where the right move depends on a sequence of decisions — game playing, robotics, controlling systems — rather than a single labelled answer.
Suppose a bank wants to flag fraudulent transactions. It has years of past transactions, each already marked "fraud" or "legitimate." That is a labelled dataset, so this is supervised learning, specifically classification. The model learns the patterns separating the two labels and applies them to new transactions in real time. If instead the bank wanted to estimate the typical spending amount per customer, that would still be supervised — but regression, predicting a number rather than a category.
Now imagine the same bank has transactions but no fraud labels at all — nobody has reviewed them. Supervised learning is impossible; there are no answers to learn from. Here unsupervised learning fits: cluster the transactions and flag the small, unusual clusters that behave unlike everything else as candidates for human review. The paradigm changed not because the goal changed but because the labels vanished. What data you hold, not what you want, decides the method.
Go long resisted computers because its search space dwarfs chess and good moves are hard to specify by rule. DeepMind's AlphaGo learned partly from human games and then by reinforcement learning — playing millions of games against versions of itself, rewarded for winning. In March 2016 it defeated Lee Sedol, one of the world's strongest players, four games to one, a milestone many experts had expected to be a decade away. Its famous move 37 in the second game was one almost no human would have played, yet it proved decisive.
Given a short problem description and the data available, choose supervised, unsupervised, or reinforcement learning — and justify the pick from the data on hand, not the goal you wish to reach.
Think Like a Maester: Before choosing an algorithm, ask what answers your data already contains. Labels point to supervised learning, their absence to unsupervised, and a reward you can measure to reinforcement.
Machine learning comes in three broad paradigms defined by what they learn from. Supervised learning needs labelled examples and predicts categories or numbers; unsupervised learning finds hidden structure, such as clusters, in unlabelled data; reinforcement learning learns through trial and error guided by rewards. The right choice follows from the data you actually have, not the outcome you wish for — a point AlphaGo made vivid by mastering Go through self-play rather than a fixed dataset.
Mark this lesson complete to track your progress.