Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Computer Science
  3. ›A4 Machine learning
  4. ›A4.3 Machine learning approaches

IB Computer Science · A4 · Machine learning

A4.3 Machine learning approaches

Compare supervised, unsupervised and reinforcement learning, give suitable problems for each, and distinguish classification from regression.

  • 4 min read
  • 6 parts
  • 10 questions
  • Draft
  • HL only
Start a Quick 5 on this topic→Jump to the 10 questions
1/6Learning approaches differ in the feedback they use
  1. 1Learning approaches differ in the feedback they use
  2. 2Supervised learning learns from labelled examples
  3. 3Classification predicts a category and regression predicts a number
  4. 4Unsupervised learning finds structure without labels
  5. 5Reinforcement learning improves behaviour through rewards
  6. 6The right approach depends on the data and goal
  7. Check your recall
  8. Practice: 10 questions
1

Part 1 of 6: Learning approaches differ in the feedback they use

Picture three students. One has homework with the answers supplied. One explores a new city and must spot patterns alone. One learns a game by trying moves and seeing what works. Machine learning approaches follow these three situations.

The key difference is the feedback available. In supervised learning the training data has labels, the known correct answers, and the model learns from them. In unsupervised learning there are no labels, so the model finds structure itself. In reinforcement learning a program learns from rewards.

Key terms · tap one for its definition

supervised learning

Supervised learning is machine learning in which a model is trained on labelled examples to predict the label of new cases.

unsupervised learning

Unsupervised learning is machine learning in which a model finds patterns or groups in unlabelled data.

reinforcement learning

Reinforcement learning is machine learning in which an agent learns actions that maximise its total reward through trial and error.

Part 1 done

2

Part 2 of 6: Supervised learning learns from labelled examples

Start with supervised learning, since it is the most common. The model sees many examples with the correct label attached. It adjusts until its predictions match those labels, then predicts for new cases. The labels act like a teacher, so accuracy can be checked against known answers.

Typical problems include spam filtering, predicting house prices and recognising handwritten digits. Each needs a large set of examples with known answers. Producing those labels can be slow and costly. A model is judged on cases it did not see during training.

Part 2 done

Quick check

One question on the part you just read

Easy

Which learning approach uses labelled training data?
Show answer and explanation

Answer: A · Worked explanation

Supervised learning trains on examples with known correct labels. Unsupervised learning uses data without labels. Reinforcement learning uses rewards rather than labels. Clustering is a task within unsupervised learning, so it does not use labelled data either. Only supervised learning needs known answers for every example.
3

Part 3 of 6: Classification predicts a category and regression predicts a number

Within supervised learning, the type of label decides the task. Classification predicts a category from a fixed set, such as spam or not spam. Regression predicts a numerical value, such as tomorrow’s temperature or a house price. Regression outputs can take any value in a range.

A classification task can have two categories or many. Spam filtering has two. Recognising ten handwritten digits has ten.

Classification compared with regression

ClassificationRegression
OutputA categoryA number
ExampleWill a loan be repaid?How much will a customer spend?
Judged byShare of correct predictionsSize of the error
Output
Classification
A category
Regression
A number
Example
Classification
Will a loan be repaid?
Regression
How much will a customer spend?
Judged by
Classification
Share of correct predictions
Regression
Size of the error

Common mistake

A numeric label can still be a category. A digit from 0 to 9 names a class, so predicting it is classification.

Key terms · tap one for its definition

classification

Classification is a supervised task in which a model predicts which category from a fixed set an item belongs to.

regression

Regression is a supervised task in which a model predicts a continuous numerical value.

Part 3 done

4

Part 4 of 6: Unsupervised learning finds structure without labels

What if no answers are available? Unsupervised learning works with unlabelled data and looks for patterns. A common task is clustering, which groups similar items together.

A shop might cluster customers by buying habits, then design offers for each group. The groups are not named in advance. A person must decide what each group means. Unsupervised learning needs no labelling effort. Its results are harder to check, because there is no known right answer.

Another use is spotting unusual items that fit no group, such as a suspicious payment.

Key term

clustering

Clustering is an unsupervised task in which similar items are grouped together without predefined categories.

Part 4 done

Quick check

One question on the part you just read

Easy

State the type of output produced by a regression model.
Show answer and explanation

Answer: B · Worked explanation

A regression model predicts a numerical value, such as a price or a temperature, from a range of possible values. Predicting a category from a fixed set is classification. Forming groups of similar items is clustering, and rewards belong to reinforcement learning.
5

Part 5 of 6: Reinforcement learning improves behaviour through rewards

Neither earlier approach suits a robot learning to walk. Here an agent takes actions in a setting and receives a reward after each one. The reward can be positive or negative. A pet learning tricks from treats is a familiar comparison.

Over many attempts, the agent learns a strategy that earns the highest total reward. Game-playing programs and balancing robots are typical examples. No labelled examples are needed, but many trials are.

A badly designed reward can encourage behaviour the designer did not intend.

Key term

agent

An agent is the learner in reinforcement learning, which chooses actions and receives rewards from its setting.

Part 5 done

6

Part 6 of 6: The right approach depends on the data and goal

Now compare the three side by side. The choice depends on what data you hold and what you want to achieve.

Three learning approaches

ApproachTraining dataFeedbackExample
SupervisedLabelled examplesCorrect answersPredicting house prices
UnsupervisedUnlabelled dataNoneGrouping customers
ReinforcementTrial and errorRewardsRobot learning to balance
Approach
Supervised
Training data
Labelled examples
Feedback
Correct answers
Example
Predicting house prices
Approach
Unsupervised
Training data
Unlabelled data
Feedback
None
Example
Grouping customers
Approach
Reinforcement
Training data
Trial and error
Feedback
Rewards
Example
Robot learning to balance

With labelled data and a clear target, supervised learning fits. With only raw data, try unsupervised learning. When a sequence of decisions earns rewards, consider reinforcement learning. Real projects sometimes combine approaches, such as clustering first and then training a supervised model on the groups.

Exam tip

In a comparison answer, name the type of feedback for each approach. Giving only examples does not show the difference.

Note read

Check your recall[14 marks]

5 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Distinguish[2 marks]

    Distinguish between supervised and unsupervised learning.

    Show mark schemeHide mark scheme

    Model answer

    Supervised learning trains on labelled data, so the model learns from known answers. Unsupervised learning uses unlabelled data and finds patterns or groups itself.

    • 1 mark for stating that supervised learning uses labelled data with known answers
    • 1 mark for stating that unsupervised learning uses unlabelled data to find structure
  2. 2.Distinguish[2 marks]

    Distinguish between classification and regression.

    Show mark schemeHide mark scheme

    Model answer

    Classification predicts a category from a fixed set, such as spam or not spam. Regression predicts a numerical value, such as a house price.

    • 1 mark for stating that classification predicts a category
    • 1 mark for stating that regression predicts a numerical value
  3. 3.Describe[3 marks]

    Describe how reinforcement learning works.

    Show mark schemeHide mark scheme

    Model answer

    An agent takes actions in a setting. After each action it receives a reward, which may be positive or negative. Over many trials it learns a strategy that earns the highest total reward.

    • 1 mark for stating that an agent takes actions
    • 1 mark for stating that it receives positive or negative rewards
    • 1 mark for stating that it learns a strategy that maximises total reward over many trials
  4. 4.State[3 marks]

    State the most suitable learning approach for each problem: (a) grouping customers when no categories exist, (b) predicting house prices from past sales with known prices, (c) a robot learning to balance.

    Show mark schemeHide mark scheme

    Model answer

    (a) Unsupervised learning, using clustering. (b) Supervised learning, as a regression task. (c) Reinforcement learning.

    • 1 mark for stating unsupervised learning for (a)
    • 1 mark for stating supervised learning for (b)
    • 1 mark for stating reinforcement learning for (c)
  5. 5.Discuss[4 marks]

    Discuss when supervised learning is a suitable choice and when it is not.

    Show mark schemeHide mark scheme

    Model answer

    It suits problems with a clear target, either a category or a number, where plenty of labelled examples exist. It is unsuitable when no labels exist or labelling is slow and costly. Unsupervised learning then fits better for finding groups. Reinforcement learning fits sequences of decisions that earn rewards.

    • 1 mark for stating that it suits problems with a clear category or numerical target
    • 1 mark for stating that it needs labelled examples
    • 1 mark for explaining that it is unsuitable when labels are unavailable or costly to produce
    • 1 mark for suggesting unsupervised or reinforcement learning as an alternative in the right situation

Practice this topic

10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 10 answered

Includes the 2 quick checks in the note above.

3.

Easy[1 mark]

In reinforcement learning, what guides the learning of the agent?
Show answer and explanation

Answer: C · Worked explanation

An agent improves by seeking the highest total reward over many trials. Labels guide supervised learning, and groups found in unlabelled data come from unsupervised learning. A reinforcement learning agent is not given a list of correct moves, so it must discover good actions through trial and error.
4.

Medium[1 mark]

A hospital trains a model on labelled scans to predict whether a scan shows a tumour, yes or no. Which description fits?
Show answer and explanation

Answer: D · Worked explanation

The scans carry known labels, so the learning is supervised. The output is a category, yes or no, so the task is classification. Regression would predict a number. Clustering uses no labels, and no agent takes actions to earn rewards here.
5.

Medium[1 mark]

A retailer holds records for thousands of customers, with no existing categories, and wants natural groups. Which approach is most suitable?
Show answer and explanation

Answer: A · Worked explanation

With no categories, there are no labels to learn from, and the aim is to find groups. That is clustering, an unsupervised task. Classification needs labelled categories to train on. Regression predicts numbers, and no agent is taking actions to earn rewards.
6.

Medium[1 mark]

Which problem is a regression task?
Show answer and explanation

Answer: B · Worked explanation

A delivery time in minutes is a numerical value, so predicting it is regression. A positive or negative review and a cat or dog label are categories, so those are classification. Grouping articles without given topics is clustering, which is an unsupervised task.
7.

Medium[1 mark]

A model predicts the digit, from 0 to 9, shown in a handwritten image. Why is this classification even though each answer is a number?
Show answer and explanation

Answer: C · Worked explanation

The digits are names for ten classes, and a prediction of 4.5 would have no meaning. That makes the task classification. Regression also uses labels, so having labels does not decide the task. The output here is not continuous, and the type of input does not decide the task.
8.

Hard[2 marks]

A game program improves by playing many matches, with +1 for a win and −1 for a loss. Which statement is correct?
Show answer and explanation

Answer: A · Worked explanation

The win or loss arrives after a sequence of actions and is a reward, not a label giving the correct move for each position. The program learns a strategy that earns the most reward. It does not group moves, and regression is a supervised task that predicts numbers from labelled examples.
9.

Hard[2 marks]

Which is a limitation that is specific to supervised learning?
Show answer and explanation

Answer: B · Worked explanation

Supervised learning depends on examples with known answers, and creating labels takes time and money. It can predict numbers through regression. Agents and settings belong to reinforcement learning. Groups that need human interpretation are a feature of unsupervised clustering, not of labelled learning.
10.

Hard[2 marks]

A team clusters its customers into four groups. What must a person still do?
Show answer and explanation

Answer: D · Worked explanation

Clustering finds groups but does not name them, so a person must decide what each group means, such as frequent small buyers. No labels are supplied beforehand, because the data is unlabelled. There are no known correct categories to match, and rewards do not feature in clustering.

Keep going

Next topicA4.4 Ethical considerationsPrevious topicA4.2 Data preprocessing

More in A4 · Machine learning

  1. A4.1Machine learning fundamentalsNotes · 10 questions
  2. A4.2Data preprocessingNotes · 10 questions· HL only
  3. A4.3Machine learning approachesNotes · 10 questions· HL only
  4. A4.4Ethical considerationsNotes · 10 questions

All IB Computer Science topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/6 read

  1. 1Learning approaches differ in the feedback they use
  2. 2Supervised learning learns from labelled examples
  3. 3Classification predicts a category and regression predicts a number
  4. 4Unsupervised learning finds structure without labels
  5. 5Reinforcement learning improves behaviour through rewards
  6. 6The right approach depends on the data and goal
  7. Check your recall
  8. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe