Skip to content

Supervised Learning

Learning from examples that come with the correct answer, so the model can predict answers for new, unlabeled examples.

Alsoclassification · regression

Fig. / How it works
Labeled examplesLabeled examplesTrain the modelTrain the modelNew, unseen inputNew, unseen inputPredicted labelPredicted label
Role · kind
Core ideasParadigm
Level
Beginner

Learning with flashcards. The front shows a picture, the back says 'dog' or 'cat'. After enough cards you can name animals on cards you have never seen.

Where it fits

Not shown: 7 more that build on it. See the full list below.

+All relationships as a list

See it on the full map

How it works

In supervised learning every training example is a pair: an input (the features) and the label (the right answer). The model learns a function from inputs to labels, then applies it to new inputs.

Two flavors:

Training follows the foundations recipe: measure the mismatch between predictions and labels with a loss function, then adjust the model to reduce it. The real test is performance on examples held back from training.

Everyday use cases

  • Case 01

    Spam filtering

    Emails labeled spam or not spam teach a classifier to sort new mail.

  • Case 02

    Price prediction

    Past sales with their prices teach a regression model to value new listings.

  • Case 03

    Medical diagnosis support

    Scans labeled by doctors teach a model to flag suspicious regions.

Strengths, weaknesses and when to use it

Strengths

  • Clear goal and clear evaluation, because you know the right answers.
  • The most mature paradigm, with the widest choice of models.

Weaknesses

  • Labels are often expensive, slow or require experts.
  • The model can only be as good, and as unbiased, as its labels.

When to use itWhen you have (or can afford to create) examples with the correct answer for the thing you want to predict.

Compare with

Check yourself

  1. Q01

    Predicting tomorrow's temperature in degrees is which kind of supervised task?

    Show answer

    B: Regression

  2. Q02

    What do you need for supervised learning that you do not need for clustering?

    Show answer

    B: Labels

Go deeper