MACHINE LEARNING • LESSON 2

Supervised vs Unsupervised Learning

Both supervised and unsupervised learning learn from data, but they have one major difference: whether the training data contains known answers.

THE BIG DIFFERENCE

Supervised Learning has answers. Unsupervised Learning does not.

In supervised learning, we give the model examples together with their correct answers. In unsupervised learning, we give the model data without predefined answers and ask it to discover useful patterns or groups.

01

First, Remember the Two Ideas

SUPERVISED LEARNING

Learn From Known Answers

The training data contains inputs and their correct answers.

Data + Answers Learn Predict
UNSUPERVISED LEARNING

Discover Patterns

The training data does not contain predefined answers.

Data Find Patterns Discover Groups
02

Example: Customer Data

Imagine an online store has information about thousands of customers.

The store knows things such as:

  • How much each customer spends.
  • How often they purchase.
  • How many products they buy.

Now imagine we have two different goals.

03

Example 1: Supervised Learning

Suppose the store already knows whether previous customers cancelled their subscription.

INPUT Customer Information

Spending, purchases, account age, activity

KNOWN ANSWER Cancelled / Did Not Cancel

The model can learn from these examples because the correct answer is already known for each customer.

Later, we give the model a new customer's information and ask:

"Will this customer cancel?"

The model uses what it learned from previous customers to make a prediction.

This is supervised learning.

04

Example 2: Unsupervised Learning

Now consider a different goal.

The store does not have customer categories. It simply wants to discover groups of customers with similar shopping behavior.

INPUT Customer Information

Spending, purchases, account age, activity

DISCOVERY Similar Customer Groups

Nobody tells the model which customer belongs to which group.

The algorithm looks at the data and finds customers that behave similarly.

This is unsupervised learning.

05

The Same Data Can Be Used Differently

This is an important point.

The difference is not necessarily the type of data. The difference is mainly what information we have about the desired answer and what we are trying to accomplish.

SAME CUSTOMER DATA Spending + Purchases + Activity
DIFFERENT GOAL Predict an Answer

Supervised

OR
DIFFERENT GOAL Discover Groups

Unsupervised

So don't memorize a list of industries and decide based only on the industry. Look at the learning problem itself.

06

A Simple Side-by-Side Comparison

Supervised Learning Unsupervised Learning
Training data has known answers. Training data has no predefined answers.
Learns the relationship between inputs and known labels. Searches for patterns or structure in the data.
Usually used to make predictions. Often used to discover groups or patterns.
Example: predict house price. Example: group similar customers.
Classification and regression are common supervised tasks. Clustering is a common unsupervised task.
07

How Do You Decide Which One to Use?

Start with the question you are trying to answer.

QUESTION 1 Do I have known answers in my training data?

If yes, supervised learning may be appropriate.

QUESTION 2 Do I want to discover unknown patterns or groups?

If yes, unsupervised learning may be appropriate.

This is a much better way to choose than simply memorizing definitions.

08

One More Simple Example

Imagine you have 10,000 emails.

In the first situation, humans have already marked every email as Spam or Not Spam.

You want a model to predict whether a new email is spam.

Known labels Learn Predict Spam / Not Spam

That is supervised learning.

Now imagine the same 10,000 emails have no labels. You simply want to discover groups of emails that are similar to each other.

Unlabelled emails Find Similarities Discover Groups

That is unsupervised learning.

09

The Easiest Way to Remember

SUPERVISED "Here are examples with answers."

Learn the relationship and predict the answer for new data.

UNSUPERVISED "Here is the data. Find something interesting."

Discover patterns, similarities, or groups in the data.

10

In One Picture

SUPERVISED Data + Answers Learn Predict
UNSUPERVISED Data Find Patterns Discover Groups
KEY IDEA

The Main Difference Is Known Answers vs Discovering Patterns.

Supervised learning learns from labelled examples and is commonly used to make predictions. Unsupervised learning works with data without predefined labels and looks for useful patterns, similarities, or groups.

QUICK CHECK

Which Type Would You Choose?

A bank has historical customer data. For every customer, it knows whether the customer eventually stopped using the bank's service.

The bank wants to predict whether a new customer is likely to leave.

Answer

Supervised Learning.

The historical data contains a known answer: whether each customer left or stayed.

Now change the problem:

The bank has customer spending and transaction data, but no customer categories. It wants to discover groups of customers with similar financial behavior.

Answer

Unsupervised Learning.

There are no predefined customer groups. The goal is to discover groups from the data.

NEXT TOPIC

Classification

We now know the difference between supervised and unsupervised learning. Next, we will look at one of the most important supervised learning tasks: classification.