Chapter 2 · Part 2

Supervised: learning from answers

The most common kind of machine learning is also the most intuitive: show the model a big pile of examples where you already know the right answer, and let it learn the pattern that maps input to answer. Then hand it something new and it predicts. This is supervised learning — the "supervisor" being the labels you provide.

Scroll to teach a model to tell cats from dogs.

Start with labeled examples — each point is a photo already tagged 'cat' or 'dog'.

scroll

Classification and regression

Supervised learning comes in two flavors, depending on what the label is:

  • Classification — the label is a category: cat/dog, spam/not-spam, fraud/legit. The model draws boundaries between classes (like the one above).
  • Regression — the label is a number: tomorrow's temperature, a house price, someone's age from a photo. The model fits a curve instead of a boundary.

Either way the recipe is identical: minimize the gap between the model's predictions and the known answers.

The catch: labels are expensive

Supervised learning is powerful and everywhere — but it has one big cost: someone has to create all those labels. A million diagnostic scans need a million radiologist annotations; a spam filter needs emails humans marked as spam. Labeling is slow, costly, and sometimes needs rare expertise. (It's exactly the labor the CAPTCHA course showed being crowdsourced from all of us.)

That expense is the whole motivation for the next paradigm. What if the machine could learn from data that nobody labeled? Next: unsupervised learning.