aımnova
DashboardMy LearningCrash CoursesStudy 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
  • Crash Courses
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Teachers
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aımnova

IB study, practice and feedback built around the real exam.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.c1e448f

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

NotesComputer Science HLTopic 4.3Classification
Back to Computer Science HL Topics
4.3.25 min read

Classification (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

  1. 1Putting things into categories
  2. 2The common algorithms
  3. 3Judging a classifier
  4. 4Exam-style question
The big idea: Classification predicts which category something belongs to, from labelled examples.

Spam or not. Benign or malignant. Which of ten digits. The output is a label, not a number on a scale.
BinaryMulti-class
CategoriesTwoThree or more
ExampleSpam / not spamWhich digit, 0–9
OutputOne probabilityA probability per class
DecisionCompare with a thresholdTake the highest

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

Decision tree

  • A sequence of yes/no questions down to a leaf
  • Fully interpretable — the path IS the explanation
  • Overfits easily unless its depth is limited

k-nearest neighbours

  • Look at the k closest examples and take the majority
  • No training at all — it just stores the data
  • Slow at prediction, and needs features on comparable scales

Logistic regression

  • Outputs a probability between 0 and 1
  • Threshold it to get a class — and the threshold is a choice
  • Despite the name, it classifies

k-NN in real life: recommendations

  • Collaborative filtering: find the k users whose ratings are most similar to yours
  • Recommend the films they liked that you have not seen

Decision trees in real life: diagnosis

  • Questions on a patient's symptoms: fever? cough lasting over 3 weeks? ...
  • Each answer leads down a branch to a likely diagnosis a doctor can check
Labelled points A and B, a new point, a dashed circle round its three nearest neighbours
k-NN categorises a new point from the labels of the points closest to it.
The threshold is a decision, not a fact: A model outputs 0.7. Calling that "positive" uses a threshold of 0.5 — but nothing forces that.

For cancer screening you would lower it, accepting more false alarms to miss fewer real cases. Moving the threshold trades false positives against false negatives, and that is a human judgement about which error is worse.

Never wonder what to study next

Get a personalized daily plan based on your exam date, progress, and weak areas. We'll tell you exactly what to review each day.

Try Free Study PlanYour first topic is free to keep • No credit card required
MeasureAnswersMatters when
AccuracyWhat fraction were right?Classes are balanced — and rarely otherwise
PrecisionOf those flagged, how many really were?A false alarm is costly
RecallOf the real cases, how many were caught?A miss is costly
Confusion matrixAll four outcomes at onceAlways — it is the honest picture
Accuracy lies on imbalanced data: On a disease affecting 1 in 1,000, a model answering "no" every time is 99.9% accurate and has never found a single case.

Always ask what a majority-class guesser would score. If it is close to your model, accuracy is telling you nothing.
Name which error is worse, and why: Full marks need the domain: a false negative in cancer screening means a missed diagnosis; a false positive means anxiety and a further test.

Say which matters more here, and what you would do to the threshold because of it.

How this is tested — you must go beyond accuracy to the two kinds of error, and tie the threshold to the cost of each. It comes up two ways:

Paper 1 Section A

  • Explain how classification works, 3-4 marks
  • Identify a task as binary or multi-class
  • State what precision or recall measures

Paper 1 Section B — case study

  • Evaluate a classifier from given figures
  • Justify moving a decision threshold
The classic trap: Quoting accuracy alone. On imbalanced data it is close to meaningless — always separate false positives from false negatives and say which is worse in this domain.

A decision boundary — and the bent one that scores 100% and generalises worse.

Interactive diagram

Explore the labelled diagram, charts and maps for this topic in full study mode.

Claim your free topic
IB-style questionEvaluate[6 marks]

A model screening 10,000 scans finds 82 of the 100 tumours present, and wrongly flags 400 of the 9,900 healthy scans. Evaluate its performance and suggest what should change.

Model answer plan

See the answer broken into clear points, with guidance on how each point earns marks.

Claim your free topic

Try an IB Exam Question — Free AI Feedback

Test yourself on Classification. Write your answer and get instant AI feedback — just like a real IB examiner.

why predicting whether an email is spam is a classification task rather than a regression task. [2 marks]

Related Computer Science HL Topics

Continue learning with these related topics from the same unit:

4.1.1Types of machine learning4.1.2Hardware for machine learning4.2.1Data cleaning4.2.2Feature selection
View all Computer Science HL topics
Improve your exam techniqueCommand terms, paper structure, and mark-scheme tips for Computer Science HL
Previous4.3.1Linear regressionNextHyperparameter tuning4.3.3

3 exam-style questions ready for you

Students who practice on Aimnova improve their scores by 15% on average. Get instant feedback that shows exactly how to improve your answers.

Practice Now — FreeView All Computer Science HL Topics