The main families — supervised, unsupervised, and reinforcement
Distinguish supervised, unsupervised, and reinforcement learning with everyday examples.
Sign in to track progress on this lesson.
01 — Main lesson
Full walk-through. · 7.2 MB
Spoken script — useful when names or terms sound ambiguous.
Welcome back. This is lesson two in our machine learning series. Last time we nailed down what machine learning is and when you should just use a rule instead. Today we are going to look at the three main families of machine learning, because once you know these, you can look at almost any problem and know which shelf to reach for.
Let us start with the big picture. Machine learning is not one thing. It is three broad families that work in fundamentally different ways. They differ in what you give the system and what you expect it to give back. The three families are supervised learning, unsupervised learning, and reinforcement learning. There are a couple of hybrid ideas sitting between them, and we will touch on those briefly, but these three are the pillars.
Let us take supervised learning first, because it is where most real-world machine learning lives. The vast majority of business machine learning you will encounter is supervised. So get comfortable with this one.
In supervised learning, you give the system labelled examples. That means each example comes with the correct answer attached. The system's job is to learn the relationship between the input and the answer, so that when it sees a new input without an answer, it can predict one.
Think about predicting house prices. You hand the system thousands of rows of historical sales. Each row has features like the number of bedrooms, the postcode, the square footage, the age of the property, and so on. Crucially, each row also has the actual sale price. That sale price is the label. The system studies all these examples and learns to map the features to a price. When you show it a new house that has not sold yet, it predicts a number. Predicting a number like a price, a temperature, or a delivery time is called regression. That is one flavour of supervised learning.
The other flavour is classification. Instead of predicting a number, you predict a category. Imagine you work for an email provider and you want to filter spam. You give the system thousands of emails, and each one is labelled as either spam or not spam. The system learns what spam tends to look like, the words, the sender patterns, the links, and then it classifies new incoming emails into one of those two buckets. Two categories is called binary classification. You can also have many categories. A model that looks at a photo and decides whether it is a cat, a dog, a bird, or a fish is doing multi-class classification. The principle is the same. Labelled examples in, a category prediction out.
The key idea in supervised learning is the label. The label is the teacher. It is what supervises the learning. Without labels, you are not in supervised territory. You are somewhere else. And that somewhere else is our second family.
Unsupervised learning is about finding structure in data when you do not have labels. Nobody has told the system what the right answer is. There is no teacher. The system has to discover patterns, groupings, or structure on its own.
The most common unsupervised technique is clustering. Imagine you have a database of all your customers, their purchase histories, browsing behaviour, locations, and demographics. You do not have a label saying which segment each customer belongs to. You just have the raw data. You ask an unsupervised algorithm to group similar customers together. It might find that your customers naturally fall into, say, four clusters. One cluster tends to be young, urban, buys frequently but in small amounts. Another is older, suburban, buys infrequently but in large amounts. The algorithm did not know these groups existed. It found them by looking at the structure of the data. That is clustering, and it is genuinely useful for marketing, product recommendations, and understanding your user base.
Another unsupervised task is anomaly detection. You have a stream of data, say network traffic on a server, and most of it looks normal. You want the system to flag anything that looks unusual without you having to define what unusual means in advance. The system learns what the normal pattern looks like and raises an alarm when something deviates significantly. Fraud detection often starts this way, though it frequently moves to supervised learning once you have enough confirmed fraud examples.
There is also dimensionality reduction, which is a fancy way of saying compression. If you have data with hundreds of features, you can use unsupervised techniques to compress it down to fewer features while keeping the most important information. This is useful for visualisation, for speeding up later models, and for removing noise. The common thread across all of unsupervised learning is that there are no labels. The system is finding structure, not predicting a known answer.
Now let us move to the third family, reinforcement learning. This one works very differently. In reinforcement learning, there is no dataset of labelled examples sitting on a table. Instead, there is an agent that takes actions in an environment and receives rewards or penalties over time. The agent learns by trial and error, gradually figuring out which actions lead to good outcomes and which do not.
Think about training a robot to navigate a maze. The robot does not have a labelled dataset saying, in this exact situation, turn left. It starts moving around, hitting walls, and occasionally finding the exit. Every time it does something good, like moving closer to the exit, it gets a positive reward. Every time it hits a wall or wastes time, it gets a penalty. Over many, many attempts, it learns a policy, which is just a strategy for what to do in each situation to maximise its total reward.
Reinforcement learning is powerful but tricky. It tends to need a huge number of trials, which means it works best when you can simulate the environment cheaply. That is why you see reinforcement learning succeeding in games like chess, Go, and video games, where you can play millions of simulated rounds quickly. It is also used in robotics and in some control problems, like optimising cooling systems in data centres. In typical business settings, reinforcement learning is less common than supervised learning, partly because it is harder to set up and partly because you often do not have a safe, cheap environment to let an agent make millions of mistakes in. But it is the right tool when your problem is fundamentally about a sequence of decisions with delayed feedback.
So those are the three pillars. Supervised learning learns from labelled examples to predict numbers or categories. Unsupervised learning finds structure in unlabelled data through clustering, anomaly detection, or compression. Reinforcement learning learns by trial and error with rewards over time.
Before we get to your quiz, let me briefly mention two ideas that sit between these families. The first is semi-supervised learning. In practice, getting labels is expensive. You might have millions of emails but only a few thousand that a human has actually labelled as spam or not spam. Semi-supervised learning uses the small set of labelled data together with the large set of unlabelled data to build a better model than you could with labels alone. It is a practical bridge between supervised and unsupervised. You do not need to know the algorithms right now, just the idea that you can combine a little labelled data with a lot of unlabelled data.
The second idea is self-supervised learning. This is where you take unlabelled data and cleverly create labels from the data itself. A good example is language models. You take a huge amount of text and for each sentence, you hide a word and ask the model to predict what was hidden. The text was never manually labelled, but you turned it into a supervised problem by using part of the data as the label for another part. This is how many modern large language models are pre-trained. It is a powerful idea that has become very important in recent years, but at its core it is still about creating a learning signal from data without human-provided labels.
Now, here is the practical takeaway. If you walk into most companies doing machine learning, you will find that the overwhelming majority of their models are supervised. They have historical data with known outcomes, and they want to predict those outcomes for new cases. Churn prediction, credit scoring, demand forecasting, spam filtering, image classification, medical diagnosis from scans, these are all supervised. Unsupervised learning shows up for exploration, segmentation, and anomaly detection. Reinforcement learning shows up in specialised, often simulated environments. So if you are unsure which family a problem belongs to, start by asking whether you have labelled examples. If yes, it is probably supervised. If no, and you want to find structure, it is unsupervised. If the problem is about making a sequence of decisions to maximise some reward over time, it is reinforcement.
Alright, let us finish with a quick quiz. I will describe three scenarios, and I want you to think about which family each one belongs to. I will give you a moment, then tell you the answer.
Scenario one. You work for a streaming service. You have data on millions of users, what they watch, when they watch, how long they watch, and what they skip. You have no labels. You want to discover natural groupings of users so the marketing team can design targeted campaigns. Which family is this?
This is unsupervised learning. You have no labels and you want to find structure, specifically clusters of similar users. No teacher, no correct answers, just patterns in the data.
Scenario two. You work for a bank. You have ten years of loan applications, each one marked as either repaid successfully or defaulted. You want to build a system that looks at a new application and predicts whether that applicant is likely to default. Which family is this?
This is supervised learning, specifically binary classification. You have labelled examples, repaid or defaulted, and you want to predict which category a new application falls into. The label is the teacher.
Scenario three. You are building a system to control the traffic lights across a city. The system can change light timings and it receives a reward based on how quickly vehicles move through the network. It needs to learn over time which timing strategies work best for different traffic conditions. Which family is this?
This is reinforcement learning. There is no fixed dataset of labelled examples. The system takes actions, observes outcomes, and adjusts its strategy to maximise a reward over time. It learns by trial and error in an ongoing environment.
So there you have it. Three families, three different ways of learning from data. Supervised learns from labelled examples to predict numbers or categories. Unsupervised finds hidden structure without labels. Reinforcement learns by trial and reward over time. And most of the machine learning you will touch in a business setting will be supervised. Next time we will dig into what supervised learning actually looks like under the hood, how features and labels fit together, and what the training process really does. For now, as you keep walking, try spotting problems around you and sorting them into these three families. It gets easier every time you do it, and it will sharpen your instincts enormously.
Let us start with the big picture. Machine learning is not one thing. It is three broad families that work in fundamentally different ways. They differ in what you give the system and what you expect it to give back. The three families are supervised learning, unsupervised learning, and reinforcement learning. There are a couple of hybrid ideas sitting between them, and we will touch on those briefly, but these three are the pillars.
Let us take supervised learning first, because it is where most real-world machine learning lives. The vast majority of business machine learning you will encounter is supervised. So get comfortable with this one.
In supervised learning, you give the system labelled examples. That means each example comes with the correct answer attached. The system's job is to learn the relationship between the input and the answer, so that when it sees a new input without an answer, it can predict one.
Think about predicting house prices. You hand the system thousands of rows of historical sales. Each row has features like the number of bedrooms, the postcode, the square footage, the age of the property, and so on. Crucially, each row also has the actual sale price. That sale price is the label. The system studies all these examples and learns to map the features to a price. When you show it a new house that has not sold yet, it predicts a number. Predicting a number like a price, a temperature, or a delivery time is called regression. That is one flavour of supervised learning.
The other flavour is classification. Instead of predicting a number, you predict a category. Imagine you work for an email provider and you want to filter spam. You give the system thousands of emails, and each one is labelled as either spam or not spam. The system learns what spam tends to look like, the words, the sender patterns, the links, and then it classifies new incoming emails into one of those two buckets. Two categories is called binary classification. You can also have many categories. A model that looks at a photo and decides whether it is a cat, a dog, a bird, or a fish is doing multi-class classification. The principle is the same. Labelled examples in, a category prediction out.
The key idea in supervised learning is the label. The label is the teacher. It is what supervises the learning. Without labels, you are not in supervised territory. You are somewhere else. And that somewhere else is our second family.
Unsupervised learning is about finding structure in data when you do not have labels. Nobody has told the system what the right answer is. There is no teacher. The system has to discover patterns, groupings, or structure on its own.
The most common unsupervised technique is clustering. Imagine you have a database of all your customers, their purchase histories, browsing behaviour, locations, and demographics. You do not have a label saying which segment each customer belongs to. You just have the raw data. You ask an unsupervised algorithm to group similar customers together. It might find that your customers naturally fall into, say, four clusters. One cluster tends to be young, urban, buys frequently but in small amounts. Another is older, suburban, buys infrequently but in large amounts. The algorithm did not know these groups existed. It found them by looking at the structure of the data. That is clustering, and it is genuinely useful for marketing, product recommendations, and understanding your user base.
Another unsupervised task is anomaly detection. You have a stream of data, say network traffic on a server, and most of it looks normal. You want the system to flag anything that looks unusual without you having to define what unusual means in advance. The system learns what the normal pattern looks like and raises an alarm when something deviates significantly. Fraud detection often starts this way, though it frequently moves to supervised learning once you have enough confirmed fraud examples.
There is also dimensionality reduction, which is a fancy way of saying compression. If you have data with hundreds of features, you can use unsupervised techniques to compress it down to fewer features while keeping the most important information. This is useful for visualisation, for speeding up later models, and for removing noise. The common thread across all of unsupervised learning is that there are no labels. The system is finding structure, not predicting a known answer.
Now let us move to the third family, reinforcement learning. This one works very differently. In reinforcement learning, there is no dataset of labelled examples sitting on a table. Instead, there is an agent that takes actions in an environment and receives rewards or penalties over time. The agent learns by trial and error, gradually figuring out which actions lead to good outcomes and which do not.
Think about training a robot to navigate a maze. The robot does not have a labelled dataset saying, in this exact situation, turn left. It starts moving around, hitting walls, and occasionally finding the exit. Every time it does something good, like moving closer to the exit, it gets a positive reward. Every time it hits a wall or wastes time, it gets a penalty. Over many, many attempts, it learns a policy, which is just a strategy for what to do in each situation to maximise its total reward.
Reinforcement learning is powerful but tricky. It tends to need a huge number of trials, which means it works best when you can simulate the environment cheaply. That is why you see reinforcement learning succeeding in games like chess, Go, and video games, where you can play millions of simulated rounds quickly. It is also used in robotics and in some control problems, like optimising cooling systems in data centres. In typical business settings, reinforcement learning is less common than supervised learning, partly because it is harder to set up and partly because you often do not have a safe, cheap environment to let an agent make millions of mistakes in. But it is the right tool when your problem is fundamentally about a sequence of decisions with delayed feedback.
So those are the three pillars. Supervised learning learns from labelled examples to predict numbers or categories. Unsupervised learning finds structure in unlabelled data through clustering, anomaly detection, or compression. Reinforcement learning learns by trial and error with rewards over time.
Before we get to your quiz, let me briefly mention two ideas that sit between these families. The first is semi-supervised learning. In practice, getting labels is expensive. You might have millions of emails but only a few thousand that a human has actually labelled as spam or not spam. Semi-supervised learning uses the small set of labelled data together with the large set of unlabelled data to build a better model than you could with labels alone. It is a practical bridge between supervised and unsupervised. You do not need to know the algorithms right now, just the idea that you can combine a little labelled data with a lot of unlabelled data.
The second idea is self-supervised learning. This is where you take unlabelled data and cleverly create labels from the data itself. A good example is language models. You take a huge amount of text and for each sentence, you hide a word and ask the model to predict what was hidden. The text was never manually labelled, but you turned it into a supervised problem by using part of the data as the label for another part. This is how many modern large language models are pre-trained. It is a powerful idea that has become very important in recent years, but at its core it is still about creating a learning signal from data without human-provided labels.
Now, here is the practical takeaway. If you walk into most companies doing machine learning, you will find that the overwhelming majority of their models are supervised. They have historical data with known outcomes, and they want to predict those outcomes for new cases. Churn prediction, credit scoring, demand forecasting, spam filtering, image classification, medical diagnosis from scans, these are all supervised. Unsupervised learning shows up for exploration, segmentation, and anomaly detection. Reinforcement learning shows up in specialised, often simulated environments. So if you are unsure which family a problem belongs to, start by asking whether you have labelled examples. If yes, it is probably supervised. If no, and you want to find structure, it is unsupervised. If the problem is about making a sequence of decisions to maximise some reward over time, it is reinforcement.
Alright, let us finish with a quick quiz. I will describe three scenarios, and I want you to think about which family each one belongs to. I will give you a moment, then tell you the answer.
Scenario one. You work for a streaming service. You have data on millions of users, what they watch, when they watch, how long they watch, and what they skip. You have no labels. You want to discover natural groupings of users so the marketing team can design targeted campaigns. Which family is this?
This is unsupervised learning. You have no labels and you want to find structure, specifically clusters of similar users. No teacher, no correct answers, just patterns in the data.
Scenario two. You work for a bank. You have ten years of loan applications, each one marked as either repaid successfully or defaulted. You want to build a system that looks at a new application and predicts whether that applicant is likely to default. Which family is this?
This is supervised learning, specifically binary classification. You have labelled examples, repaid or defaulted, and you want to predict which category a new application falls into. The label is the teacher.
Scenario three. You are building a system to control the traffic lights across a city. The system can change light timings and it receives a reward based on how quickly vehicles move through the network. It needs to learn over time which timing strategies work best for different traffic conditions. Which family is this?
This is reinforcement learning. There is no fixed dataset of labelled examples. The system takes actions, observes outcomes, and adjusts its strategy to maximise a reward over time. It learns by trial and error in an ongoing environment.
So there you have it. Three families, three different ways of learning from data. Supervised learns from labelled examples to predict numbers or categories. Unsupervised finds hidden structure without labels. Reinforcement learns by trial and reward over time. And most of the machine learning you will touch in a business setting will be supervised. Next time we will dig into what supervised learning actually looks like under the hood, how features and labels fit together, and what the training process really does. For now, as you keep walking, try spotting problems around you and sorting them into these three families. It gets easier every time you do it, and it will sharpen your instincts enormously.
02 — Refresh
Short recap. · 987 KB
Spoken script — useful when names or terms sound ambiguous.
Quick recap of lesson two. Machine learning has three main families. Supervised learning uses labelled examples, where each data point comes with the correct answer, and the system learns to predict either a number, like a house price, or a category, like spam or not spam. This is where most business machine learning lives. Unsupervised learning works without labels. It finds structure in data on its own, through clustering, anomaly detection, or compression. You use it when you want to discover natural groups in your customers or flag unusual behaviour without defining unusual in advance. Reinforcement learning is different again. There is no static dataset. An agent takes actions in an environment, receives rewards or penalties, and learns a strategy over time through trial and error. It shines in simulated environments like games and robotics but is less common in everyday business settings. Two hybrid ideas worth knowing are semi-supervised learning, which combines a small amount of labelled data with a large amount of unlabelled data, and self-supervised learning, which creates labels from the data itself, as when a language model predicts hidden words in a sentence. The practical rule is this. If you have labelled examples and want to predict outcomes, think supervised. If you have no labels and want to find structure, think unsupervised. If your problem is about sequential decisions with rewards over time, think reinforcement. Most of the time, in most businesses, it will be supervised.