Lesson 1.2 · 6 min read · about 45 min to master at a very slow pace

Types of Learning

Supervised, unsupervised, semi-supervised and reinforcement learning: what training information each uses, what it aims for, and the notation for training examples.

Not startedJump to quiz

Four ways to learn

TypeTraining informationGoal and examples
SupervisedLabelled pairs Learn the mapping . Classification predicts a category; regression predicts a number.
UnsupervisedInputs only, no labelsFind structure: clustering, anomaly detection, density estimation.
Semi-supervisedA few labelled examples, many unlabelledUse the unlabelled data to help: name one face in a photo cluster and the rest follow.
ReinforcementAn agent acts and receives rewards or penaltiesLearn a policy that maximises reward: games, robotics, control.

Notation for training data

A supervised training set has examples, written . The superscript in brackets, , is an index that picks out example , not a power. is usually a vector of features and its label.

Classification or regression?

Look at the target, not the inputs:

  • "Will this customer leave? (yes/no)" and "which digit is this?" are classification: a finite set of labels.
  • "What grade will a student get from their hours of study?" is regression: a number.

The type of target decides the output layer and the loss of a network (Section 6).

Scope

This course covers supervised learning with neural networks. Reinforcement learning needs extra machinery (Markov decision processes) and is outside its scope; know the high-level distinction.

Stuck? Common doubts

Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.

First passDoes mean squared?

No. In ML notation means "the second training example". A power would be written without brackets, . Mixing the two up is a common source of mistakes in derivations, so it's worth writing a small legend of what each index means.

Cheatsheet

Learning types

Supervised: labelled → classification (category) or regression (number). Unsupervised: no labels → structure. Semi-supervised: few labels. Reinforcement: rewards → policy.

See every cheatsheet by category →

Check your understanding

Score 75% or more to master this lesson and earn XP. Answer first, then check.

Q1applyA model predicts a student's final mark (0–100) from hours of study. What kind of task is this?
Q2applyYou have 10,000 customer records with no labels and want to find natural groups of similar customers. Which type of learning fits?
Q3conceptIn the notation , what does the superscript mean?
Q4conceptWhat distinguishes reinforcement learning from supervised learning?
Q5interpretA photo app asks you to name one face, then names the same person across hundreds of other photos. Which type of learning does this illustrate?