aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aimnova.

AI-powered study platform for smarter revision, past-paper analysis and examiner-style feedback.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.8afc4e3

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer Science HLTopic 4.3Clustering
Back to Computer Science HL Topics
4.3.44 min read

Clustering (Computer Science HL)

IB Computer Science • Unit 4

IB exam ready

Study like the top scorers do

Access a smart study planner, AI tutor, and exam vault — everything you need to hit your target grade.

Start Free

Contents

  • Finding groups nobody defined
  • k-means, step by step
  • Choosing k, and reading the result
  • Exam-style question
The big idea: Clustering groups records that resemble each other, with no labels and no idea in advance of what the groups should be.

The groups are the output, not the input. That is what makes it unsupervised.
ClassificationClustering
LearningSupervisedUnsupervised
NeedsLabelled examplesNo labels at all
Groups areKnown in advanceDiscovered
QuestionWhich known category is this?What groups exist here?
Evaluated byComparing with the true answerJudgement — there is no true answer

Free preview

This is the free notes preview

You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:

  • FlashcardsLock in vocabulary and key terms with spaced repetition.
  • Practice questionsAnswer exam-style questions and get instant AI marking.
  • Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
  • Personalised study planA daily plan built around your exam date and weak areas.
Start Studying Free Full access to Aimnova Pro · cancel anytime
1

Choose k and place centres

2

Assign

3

Move the centres

4

Repeat until stable

The starting positions change the answer: Different random starts can give different final clusters from the same data. k-means finds a local optimum, not the best possible grouping.

Standard practice is to run it several times and keep the best — which is an admission that one run cannot be trusted.

Memorize terms 3x faster

Smart flashcards show you cards right before you forget them. Perfect for definitions and key concepts.

Try Flashcards FreeYour first topic is free to keep • No credit card required

Deciding how many clusters

  • The elbow method — plot total within-cluster distance against k and look for where it stops falling sharply
  • Beyond that point, extra clusters split groups that were already coherent
  • Domain knowledge often beats the plot: a shop may want four segments because it can run four campaigns
  • k = n gives a perfect score and no information, which shows the measure alone cannot choose
The clusters have no names: The algorithm returns "cluster 0, 1, 2". Deciding that cluster 1 is "price-sensitive weekly shoppers" is a human interpretation of the records inside it.

That interpretation can be wrong, and nothing in the output will say so.
Scale the features first: k-means uses distance, so a feature measured in thousands dominates one measured in units. Income in pounds against number of children will cluster almost entirely on income.

Normalising first is not a detail — without it the result is decided by whichever column happens to have big numbers.

How this is tested — you must identify a task as unsupervised, trace k-means, and be honest about what the output does not tell you. It comes up two ways:

Paper 1 Section A

  • Describe how clustering groups data, 3-4 marks
  • Identify a task as supervised or unsupervised
  • State one step of k-means

Paper 1 Section B — case study

  • Justify clustering for a scenario
  • Explain a limitation of the result
The classic trap: Saying the algorithm "finds customer types". It finds groups of similar records. Calling one of them a customer type is a human reading, and it can be wrong.
IB-style questionDescribe[5 marks]

A supermarket wants to group customers by shopping habits without deciding the groups in advance. Describe how k-means would do this and state two limitations.

Model answer plan

See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.

Claim your free topic

IB Exam Questions on Clustering

Practice with IB-style questions filtered to Topic 4.3.4. Get instant AI feedback on every answer.

Practice Topic 4.3.4 QuestionsBrowse All Computer Science HL Topics

How Clustering Appears in IB Exams

Examiners use specific command terms when asking about this topic. Here's what to expect:

Define

Give the precise meaning of key terms related to Clustering.

AO1
Describe

Give a detailed account of processes or features in Clustering.

AO2
Explain

Give reasons WHY — cause and effect within Clustering.

AO3
Evaluate

Weigh strengths AND limitations of approaches in Clustering.

AO3
Discuss

Present arguments FOR and AGAINST with a balanced conclusion.

AO3

See the full IB Command Terms guide →

Related Computer Science HL Topics

Continue learning with these related topics from the same unit:

4.1.1Types of machine learning
4.1.2Hardware for machine learning
4.2.1Data cleaning
4.2.2Feature selection
View all Computer Science HL topics

Improve your exam technique

Command terms, paper structure, and mark-scheme tips for Computer Science HL

Previous
4.3.3Hyperparameter tuning
Next
Association rules4.3.5

Ready to master Clustering?

Practice with MCQs, short answer questions, and extended response questions. Get instant AI feedback to improve your understanding.

Start Practicing FreeView All Computer Science HL Topics