The five kinds of learning: study notes

0.05 The five kinds of learning: detailed study notes

Learn AI by Story · Module 0: What is AI · Level: Beginner

The idea in one sentence

Machines learn in five main ways, depending on the feedback they get: labels, no labels, a few labels, labels made from the data itself, or rewards.

The story from the video

Neha is learning to cook and meets all five styles: a teacher tasting every dish (supervised), sorting spices into groups herself (unsupervised), a few labelled dishes among many unlabelled ones (semi-supervised), guessing a hidden word in a recipe (self-supervised), and learning from rewards when a dish turns out great (reinforcement).

Key definitions

Term

Definition

In plain English

Learning (in ML)

Improving performance on a task by using data or experience.

Getting better from examples.

Label

The correct answer attached to an example (for instance cat or not cat).

The answer key.

Supervised learning

Learning a mapping from inputs to outputs using examples that all have labels.

Learning with a teacher.

Unsupervised learning

Finding structure in data that has no labels.

Learning without answers.

Semi-supervised learning

Learning from a small amount of labelled data together with a large amount of unlabelled data.

A few answers, many questions.

Self-supervised learning

A learning method in which the labels are created automatically from the data itself.

The data teaches itself.

Reinforcement learning (RL)

Learning to choose actions by trial and error, guided by rewards and penalties.

Learning from consequences.

Classification

Predicting a category (spam or not).

Which one?

Regression

Predicting a number (a price).

How much?

Clustering

Grouping similar items without labels.

Sorting into piles.

Agent

In RL, the learner that picks actions.

The player.

Environment

In RL, the world the agent acts in.

The game or world.

Reward

A number that tells the agent how good an outcome was.

The score.

Policy

The agent's strategy for choosing actions.

The playbook it learns.

Detailed explanation

1. Supervised learning

Every training example comes with the correct answer. The model learns to map input to label and then predicts labels for new inputs. There are two main kinds: classification (predict a category, such as spam or not spam) and regression (predict a number, such as a house price). Neha's teacher tasting each dish and saying good or bad is supervision. Typical uses: spam filters, price prediction, medical image diagnosis, credit scoring. Its main cost is that labelled data is often expensive: someone has to label every example.

2. Unsupervised learning

There are no labels. The machine looks for structure in the data on its own. The most common tasks are clustering (grouping similar items, like sorting spices into groups that look alike), dimensionality reduction (compressing many features into fewer while keeping the important structure) and anomaly detection (finding unusual items). Typical uses: grouping customers by behaviour, spotting odd transactions, organising documents by topic. Because there is no answer key, judging whether the result is good needs human review or indirect measures.

3. Semi-supervised learning

Labelling is expensive, but unlabelled data is plentiful. Semi-supervised learning uses a small labelled set plus a large unlabelled set. For example, with 100 labelled dishes and 10,000 unlabelled ones, the model learns from the labelled ones and uses the structure of the unlabelled ones to improve its guesses, sometimes by creating its own temporary labels (pseudo-labels) for confident cases. It is useful in areas such as medical imaging and speech, where expert labelling is costly.

4. Self-supervised learning

Here the data supplies its own labels. Take a recipe and hide a word: "Add the ___ to the pan." The model must guess the missing word, and the hidden word is the label. Because any large collection of text, images or audio can be turned into such puzzles, no human labelling is needed. Large language models are trained this way: they predict the next or missing words across huge amounts of text. Self-supervised learning is why modern language models and many vision models can learn from enormous amounts of raw data. After this pre-training, the model is often adapted to specific tasks with a small amount of labelled data.

5. Reinforcement learning

An agent interacts with an environment: it observes the situation, takes an action, and receives a reward or penalty. Its goal is to learn a policy that maximises total reward over time. Neha tries a dish, gets a reward when it is great and a penalty when it is bad, and slowly learns what to do. There is no answer key for each step, only feedback that may arrive late (you learn the dish was good only at the end). Typical uses: game-playing programs, robot control, and tuning systems such as recommendations or resource allocation. Related techniques also help fine-tune language models using human feedback.

6. How to choose

Situation

Best fit

You have plenty of labelled examples

Supervised

You have data but no labels, and want structure

Unsupervised

Few labels, lots of raw data

Semi-supervised

Huge raw data and you can create a prediction puzzle from it

Self-supervised

A sequence of decisions with feedback from outcomes

Reinforcement

What the video did not explain

  • Tasks versus kinds of learning. Classification and regression are tasks, while supervised and unsupervised are kinds of learning. Video 2.04 compares classification and regression.
  • Common algorithms for each kind. Supervised: linear and logistic regression, decision trees, neural networks. Unsupervised: k-means clustering, principal component analysis. Reinforcement: Q-learning, policy gradient methods. They appear later in the roadmap.
  • Hybrids. Modern systems often combine several: a language model is pre-trained with self-supervision, adapted with supervised examples, and refined with reinforcement-style feedback from people.
  • Other flavours. Transfer learning (reuse what was learned on one task), few-shot learning (learn from a handful of examples), active learning (the model asks for the labels that help most) and online learning (learn as data arrives).
  • The exploration versus exploitation trade-off in RL. The agent must balance trying new actions with repeating ones that already work.
  • Why labels are costly. Labelling needs time, money and sometimes experts, and labels can be wrong or biased.
  • Evaluation differs. Supervised models are tested against known answers; unsupervised results are harder to judge; RL is measured by total reward.

Worked example

You have 1,000 house sales in a city.

  • Predict the price of a new house. Each sale has a price, which is the label, so this is supervised regression.
  • Group the houses into neighbourhood types without using the price. There is no label, so this is unsupervised clustering.
  • You know the price for only 50 of the 1,000 houses. A few labels and many unlabelled ones, so this is semi-supervised.
  • Hide the number of bedrooms in each listing and train a model to guess it from the other details. The label is created from the data, so this is self-supervised.
  • A program sets rental prices every week and gets rewarded for occupancy and income. It learns from outcomes, which is reinforcement learning.

Summary table:

Kind

Feedback

Typical use

Supervised

Labels for every example

Spam, prices, medical scans

Unsupervised

None

Customer groups, odd data

Semi-supervised

A few labels

When labelling is costly

Self-supervised

Labels made from the data

Language models

Reinforcement

Rewards and penalties

Games, robots

Common mistakes and myths

  • Mixing up unsupervised and self-supervised. Self-supervised builds its own labels from the data and learns to predict them. Unsupervised does not predict labels at all.
  • Thinking reinforcement learning uses a labelled dataset. It learns from trial and reward.
  • Assuming you must label everything. Semi- and self-supervised methods exist to reduce that cost.
  • Thinking supervised means a person watches the model. It means the training examples have answers.
  • Believing one kind is always best. The right kind depends on the data and the problem.

Where it is used

  • Supervised: fraud and spam detection, price and demand forecasting, medical diagnosis support.
  • Unsupervised: market segmentation, anomaly detection, recommendation groupings.
  • Semi-supervised: speech recognition, medical imaging, web page classification.
  • Self-supervised: chatbots and language models, image and audio models.
  • Reinforcement: game agents, robot control, resource scheduling.

Self-check questions

  1. Which kind needs a label for every example? Supervised.
  2. Which kind finds groups without labels? Unsupervised.
  3. Why use semi-supervised learning? Labelling is expensive, and only a few labels exist.
  4. Where do self-supervised labels come from? From the data itself, like a hidden word.
  5. What teaches a reinforcement learning agent? Rewards and penalties from its actions.
  6. Is predicting a house price classification or regression? Regression, because the output is a number.
  7. Give an example of unsupervised learning. Grouping customers by shopping habits (clustering).
  8. What are the agent, environment and reward in RL? The learner, the world it acts in, and the score it receives.
  9. Name the exploration versus exploitation trade-off. Trying new actions versus repeating actions that already work.
  10. Which kind is used to pre-train language models? Self-supervised learning.

Key takeaways

  • The five kinds differ by the feedback the learner gets.
  • Labels: supervised. No labels: unsupervised. A few labels: semi-supervised. Labels from the data: self-supervised. Rewards: reinforcement.
  • Classification and regression are tasks within supervised learning.
  • Modern systems often mix several kinds.

Go deeper and what next

  • For five apps you use, decide which kind of learning is probably behind each.
  • Look up one algorithm for each kind.
  • Next in the roadmap: 0.06 Where AI already runs your day.

Comments

Popular posts from this blog

What is AI? Narrow vs General Intelligence (Study Notes)

Rules vs learning: study notes