A4.1.1 · Machine learning fundamentals
Types of machine learning
By the end you can
Tell supervised, unsupervised, reinforcement, deep and transfer learning apart, and match each to real applications such as medical imaging, language and robotics.
Most programs you have written follow rules that you worked out and typed in. That works well for adding up a bill, but it is hopeless for telling a cat from a dog in a photo, because nobody can write down the rules. turns the process around: you give the computer many examples, and its algorithm works out the rules by itself. What it produces is a , which you then use on new data.
The examples a model learns from are its . The way it learns depends on what that data looks like and what feedback the learner receives. That gives five main kinds of machine learning.
The five types#
| Type | What it learns from | Typical output | Example |
|---|---|---|---|
| Labelled examples: input and correct answer | A category (classification) or a number (regression) | Predicting house prices; spotting spam | |
| Data with no labels | Groups, or items that go together | Customer segments; shopping baskets | |
| Rewards and penalties from an environment | A policy: which action to take in each situation | Game-playing; robot navigation | |
| Large data sets, through a network of many layers | Predictions from raw data such as pixels, sound or text | Face recognition; speech to text | |
| A model already trained on a related task | A new model, fine-tuned with a small data set | Adapting an image network to X-rays |
The first three describe how the learner gets feedback. Deep learning describes the kind of model: a neural network with many layers. Transfer learning describes where the starting point comes from. That is why they overlap: a deep network trained on labelled photos is deep learning and supervised learning at once, and fine-tuning it on X-rays adds transfer learning too.
In supervised learning, each training example has a : the correct answer. Predicting a category such as spam or not spam is called classification, and predicting a number such as a price is called regression. Unsupervised learning has no labels. In reinforcement learning there are no labels either, but an is told how well it did through a .
Situation 1 of 10
A model is trained on 20 000 past house sales, each with its features and its final price, to predict the price of a new house.
How the ideas fit together#
(AI) is the broad aim of getting computers to do things that normally need human intelligence. Machine learning is the part of AI that does it by learning from data. Deep learning is a part of machine learning, not a rival to it: it is machine learning that uses neural networks with many layers. Plenty of machine learning (a decision tree, k-means) uses no neural network at all, and the labels can be combined: deep reinforcement learning is reinforcement learning whose decisions come from a deep network. All AI that exists today is narrow AI, built for particular tasks. Human-level general AI that can work across any domain does not exist. Generative AI, which produces text, images, audio or video in response to a prompt, is a fast-moving part of the field.
Applications and the types that fit them#
Real problems usually use more than one idea. The skill the exam asks for is to name the type and say why it fits the problem.
| Application | Best-fitting types | Why |
|---|---|---|
| Unsupervised | Looking for items that occur together in baskets. No outcome is labelled in advance. | |
| Medical imaging diagnosis | Supervised, deep, transfer | Scans labelled with diagnoses; a convolutional network learns the image features; a network pre-trained on general images is adapted when labelled scans are scarce. |
| Deep, supervised, transfer | Deep networks (such as transformers) handle the order and context of words; many tasks have labelled examples; large pre-trained language models are fine-tuned for a task. | |
| Object detection and classification | Supervised, deep | Training images are labelled with the objects in them, often with boxes drawn around each; a CNN learns to find and name them. |
| Robot navigation | Reinforcement, supervised | A robot learns routes by trial, error and reward; supervised models can recognise obstacles from sensor data. |
| Sentiment analysis | Supervised, deep, transfer | Reviews labelled positive, negative or neutral; networks that read word order do well; a language model can be adapted to a new kind of text. |
What the types have in common#
- Data is the raw material. More and better examples usually mean a better model, which is why the next chapter, A4.2, is about preparing data.
- They all produce a model that has to be tested on data it has not seen (A4.3.3), because a model that merely memorised its training examples is useless.
- Each one makes decisions that affect people, so the ethics of A4.4 apply to all of them.
Check yourself
Types of machine learning
Quick questions, made fresh every time and marked here. Do a few until they feel easy.
Exam practice
Paper 1-style questions
6 questions · 22 marks
Write your answer as you would in the exam, then show the mark points and tick each one your answer made. These are our own questions in the style of the exam, not past-paper questions.
1.Describe how machine learning differs from traditional programming.
[3]Describe: A detailed account: say what happens, step by step if it is a process.
2.Distinguish between supervised and unsupervised learning.
[3]Distinguish: Make the differences between two things clear.
3.Describe how reinforcement learning could be used to teach a robot to navigate a warehouse.
[3]Describe: A detailed account: say what happens, step by step if it is a process.
4.Explain why transfer learning is useful when a hospital has only a few hundred labelled scans.
[3]Explain: Give reasons: say what happens AND why, or how one thing causes another.
5.Identify the main type of machine learning best suited to each application: (a) grouping customers by shopping habits with no labels, (b) deciding whether a photo shows a cat or a dog, (c) a program learning to play chess by playing itself, (d) translating text between languages with a very large model.
[4]Identify: Pick out the answer from the options or the context.
6.A hospital wants a tool that spots fractures in X-ray images. Discuss how supervised learning, deep learning and transfer learning could each contribute to building it.
[6]Discuss: Look at the question from more than one side, weigh the points against each other, and come to a conclusion.
In a nutshell
- Machine learning lets a program find the rules from data instead of being given them. The result of training is a model.
- Supervised learning uses labelled data (classification: categories; regression: numbers). Unsupervised learning finds structure in unlabelled data.
- Reinforcement learning: an agent learns from rewards and penalties by acting in an environment. Deep learning: neural networks with many layers. Transfer learning: reuse a trained model for a new task.
- Applications: market basket analysis (unsupervised), medical imaging (supervised, deep, transfer), language and sentiment (deep, supervised, transfer), object detection (supervised, deep), robot navigation (reinforcement, supervised).
- The five types overlap. Deep learning and transfer learning are usually supervised underneath, so say which feature of the problem decides your choice.
