beginner · ~12 min

Machine Learning Algorithms: The Big Picture

The three fundamental learning paradigms — supervised, unsupervised, and reinforcement — and how to tell which one a problem needs.

Every other module in this course drops you straight into one specific kind of machine learning — gradient descent fitting a line, a neural net learning a decision boundary. Before going further, it's worth zooming out: those are both examples of just one of three fundamentally different ways a machine learning algorithm can learn.

  • Supervised learning — algorithms learn from labeled data, where the input-output relationship is already known. Every training example comes with the "correct answer" attached, and the algorithm's job is to learn the mapping from input to answer well enough to predict it for new, unseen inputs.
  • Unsupervised learning — algorithms work with unlabeled data to identify patterns or groupings on their own. There's no "correct answer" in the data at all — only structure waiting to be discovered.
  • Reinforcement learning — algorithms learn by interacting with an environment and receiving feedback in the form of rewards or penalties, rather than being shown labeled examples or unlabeled data up front at all.

Beginner tip

The fastest way to tell them apart: ask what feedback the algorithm gets. A fixed answer for every example → supervised. No answers at all, just data → unsupervised. A reward that only arrives after taking an action → reinforcement.

Every module before this one in the beginner and intermediate tiers — linear regression, the neural net classifier, convolutions, embeddings — is supervised learning. That's not a coincidence: supervised learning is the most mature and widely deployed of the three, which is why it's where this course starts. But it's not the whole picture.

🔍 Deep dive: Supervised learning: regression vs. classification

Supervised learning splits further by what kind of answer is being predicted. Regression predicts a continuous number — a price, a temperature — exactly what the Linear Regression Playground module did. Classification predicts a category from a fixed set — spam or not spam, which digit a picture shows — exactly what Your First Neural Net did. Same paradigm (labeled data, learn the mapping), different shape of output.

Unsupervised learning shows up whenever there's no ground truth to learn from — clustering (grouping similar data points, like the k-means demo below), dimensionality reduction (compressing data down to its most important patterns), and anomaly detection (finding data that doesn't fit any discovered pattern) are the three you'll run into most.

Production note

This course's Word Embeddings module is arguably unsupervised in spirit — a word's embedding is learned from which words tend to appear near it, with no human-provided "meaning" label attached to any word. Real-world ML systems frequently blend paradigms this way rather than staying purely in one lane.

Reinforcement learning is the odd one out: there's no dataset prepared in advance at all. An agent takes actions in an environment, and only finds out how good an action was via a reward — sometimes delayed by many steps (a chess move only pays off, or doesn't, dozens of moves later). This creates a problem neither of the other two paradigms has: the exploration/exploitation trade-off — should the agent keep doing what's worked so far, or risk trying something new that might work even better?

Try all three below. The supervised tab trains a real classifier on labeled points; the unsupervised tab runs real k-means clustering with no labels in sight; the reinforcement tab is a small "multi-armed bandit" — pull levers, collect rewards, and watch an agent learn which lever pays off best purely from experience.

🔍 Deep dive: Where do 'semi-supervised' and 'self-supervised' learning fit?

These aren't a fourth paradigm so much as strategies for getting more out of the first two. Semi-supervised learning trains on a small amount of labeled data plus a much larger pool of unlabeled data — useful because labeling is often expensive but raw data is cheap. Self-supervised learning manufactures its own labels from unlabeled data — a word embedding model predicting a masked-out word from its context needs no human labels at all, since the "label" is just another part of the same unlabeled text. Most modern large language models are trained this way.

Production note

How you'll actually reach for these in practice: scikit-learn's LinearRegression, LogisticRegression, and every neural net in this course are supervised. sklearn.cluster.KMeans is unsupervised. Reinforcement learning has its own specialized libraries entirely — Gymnasium for environments, Stable-Baselines3 for algorithms — because the training loop (interact, observe reward, update policy) looks nothing like model.fit(X, y).

Playground

Every point below already has a color — its label. That's what makes this supervised: the algorithm's whole job is to learn a rule that predicts the color from the position, by comparing its guesses against the true labels and correcting itself.

Step 0accuracy: 0%

Mini project

For each scenario, pick which of the three paradigms it is. You'll see immediately whether you're right, plus a one-line reason why.

Score: 0 / 0 answered (8 total)

Predicting a house's sale price from a dataset of past sales, where every past sale's price is already known.

Grouping customers into segments based on purchase history, with no predefined segment names to sort into.

Training a program to play chess by rewarding it for winning and penalizing it for losing, over thousands of games.

Classifying emails as spam or not-spam, trained on a mailbox of emails a person has already marked one or the other.

Flagging unusual credit card transactions by finding ones that don't fit any of the normal spending clusters.

A simulated robot learns to walk by trying movements and getting a higher score the farther it travels before falling.

Discovering that a streaming service's viewers naturally fall into a handful of taste clusters, with no prior category list.

Diagnosing a disease from a patient's symptoms, trained on medical records where the correct diagnosis is already recorded.