B2 · How Artificial Intelligence Works: Data and Learning

Supervised Learning

Supervised learning is machine learning from examples that come with the correct answers, called labels. The model learns to predict the label for new examples. It is the most widely used kind of machine learning.

8 min Beginner Jump to the activity

What you need: Nothing. This page starts from the beginning, with no programming and no formulas.

Definition

How does your email know what spam looks like?

Supervised learning is machine learning from examples that come with the correct answers, called labels. The model learns to predict the label for new examples. It is the most widely used kind of machine learning.

In simple words

It is like learning with a teacher who marks every answer. Millions of people click "report spam", and each click is a label. The filter learns from those labelled emails and then sorts new emails by itself.

Why it matters

Spam filters, face unlock, price prediction, disease detection from scans and handwriting recognition all use supervised learning. Whenever you can collect examples with known answers, this is usually the first choice.

How it works

TaskExampleLabel
Spam filterAn emailSpam or not spam
Face unlockA photo of a faceOwner or not owner
House priceSize, area, roomsThe price it sold for

When the label is a category, such as spam or not spam, the task is called classification. When it is a number, such as a price, it is called regression.

Try it yourself

Learning with an answer key

Follow a teacher marking a student's work. Supervised learning works the same way.

Is this supervised learning?

Does each task learn from examples that come with the right answers?

  • Reading handwritten numbers using examples marked 0 to 9

  • Learning to spot spam from emails people marked as spam

  • Grouping customers by shopping habits with no labels

  • Predicting tomorrow's bus arrival from past times

  • A robot learning to walk from rewards for each step

Common mistakes

  • Thinking supervised means a person watches the model all the time. It means the examples have labels.
  • Forgetting that labels must be correct. Wrong labels teach wrong answers.
  • Mixing up classification and regression.

Check yourself

Question 1

1. What makes learning 'supervised'?

Question 2

2. Predicting a house price is…

Question 3

3. Each 'report spam' click is…

Summary

  • Supervised learning learns from labelled examples.
  • Categories are classification; numbers are regression.
  • It powers spam filters, face unlock and price prediction.

Finished reading?

Sources: Google Machine Learning Crash Course