Skip to content

Labs · 9618 18.1 · classification

Catch the Spam: a Naive Bayes Filter

Label your messages as spam or not spam and the filter counts the words. Then it works out the chance that a new message is spam, word by word. Find out why it needs α, and where to set the line.

4 levelsFree bench

In the exam

9618/32 October/November 2022 · Question 7 · 4 marks

Supervised and unsupervised learning are two categories of machine learning. Describe supervised learning and unsupervised learning.

Points that gain marks

  • Supervised: it is trained on labelled data: example inputs given with their correct outputs.
  • Supervised: it learns from past examples and predicts outputs for new data.
  • Unsupervised: it is given only input data, with no labels and no correct outputs.
  • Unsupervised: it finds unknown patterns or groups in the data by itself.

In this lab: A spam filter is supervised learning: in level 1 you label each message as spam or not spam, the filter learns from those labelled examples, and then predicts the label of new messages.

More real experiments

All labs →

Log in or create account

IGCSE, A-Level & AP