Skip to main content
Machine Learning & Deep Learning

⏱ About 15 min15 XP

The Three Kinds of Learning

Not every learning problem looks the same. Sometimes you have a pile of labeled examples to study. Sometimes you have a pile of unlabeled data and you need the machine to find structure on its own. Sometimes you need a machine to figure things out by trying and failing, the way a toddler learns to walk. Machine learning researchers recognized these differences and organized them into three broad categories.

Supervised Learning: Learning with a Teacher

Supervised learning is the most common type. You give the system a dataset where every example is already labeled with the correct answer. The system learns to map inputs to outputs by studying those labeled pairs. Example: You want to build a system that decides whether a tumor in a scan is malignant or benign. You collect ten thousand scans, each already labeled by a doctor. The algorithm studies the scans alongside the labels and learns what patterns predict each outcome. The word supervised refers to the fact that a human supervisor provided the correct answers during training. After training, the system can classify new, unlabeled scans.

Supervised Learning

Supervised learning trains a system on labeled examples — pairs of (input, correct answer) — so it can predict the correct answer for new inputs it has never seen.

Spam detection, image classification, speech recognition, and price prediction are all supervised learning tasks. Every one of them requires a large set of examples with known answers to train on.

Unsupervised Learning: Finding Hidden Structure

Unsupervised learning removes the labels. The algorithm receives a dataset and must discover structure — groupings, patterns, anomalies — without being told what to look for. Example: A music streaming service has millions of listeners but no one has labeled them as jazz fans or hip-hop fans. An unsupervised algorithm clusters listeners by their behavior — people who listen to similar songs at similar times end up in the same group. The algorithm did not know what to call the groups; it just found them. This is useful whenever you want to discover categories that were not defined in advance.

Unsupervised Learning

Unsupervised learning finds patterns, groupings, or structure in data that has no labels attached. The algorithm defines the categories rather than being taught them.

Reinforcement Learning: Learning by Trying

Reinforcement learning is the most different of the three. There are no labeled examples at all. Instead, an agent takes actions in an environment and receives rewards or penalties based on the outcomes. It learns to take actions that maximize reward over time. Example: A reinforcement learning agent learns to play a video game. It does not know the rules. It tries pressing buttons, watches what happens to the score, and gradually figures out which button sequences lead to higher scores. After millions of trials, it plays the game at superhuman level. The 2016 program AlphaGo, which defeated the world champion at the ancient board game Go, used reinforcement learning. No human told it which moves were good — it discovered strategy by playing games against itself.

Reinforcement Learning

Reinforcement learning trains an agent to take actions in an environment by rewarding desirable outcomes and penalizing undesirable ones. The agent learns strategy through trial, error, and accumulated experience.

Flashcards — click each card to reveal the answer

Quick Memory Hook

Supervised = teacher grades your homework. Unsupervised = you sort a messy room without instructions. Reinforcement = you learn a video game by playing until you stop dying.

A hospital trains an AI to detect pneumonia using ten thousand chest X-rays, each marked 'pneumonia' or 'clear' by radiologists. Which type of learning is this?

A retailer groups its customers into segments based on purchase history, without deciding in advance what the groups should be. Which type of learning fits?

Sort the Learning Types

  1. Step 1: Read each scenario below and assign it to supervised, unsupervised, or reinforcement learning. Write your answers.
  2. A) A robot arm learns to stack blocks by trying thousands of stacking attempts and receiving a score for height achieved.
  3. B) A system learns to translate French to English using millions of sentence pairs where each French sentence is matched to its English translation.
  4. C) An algorithm analyzes a company's network traffic and flags unusual patterns it has never seen labeled as attacks.
  5. Step 2: For each scenario, write one sentence explaining why you chose that category.
  6. Step 3: Invent your own example for whichever type you found hardest to grasp.