Skip to content
ml-recall

#worked-example

1 question from Classification

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Short answer

mediumAI-checkedClassification

Six training SMS are encoded by whether four words occur:

message block free prize urgent label
1 0 0 1 1 spam
2 0 1 0 1 ham
3 1 0 0 0 ham
4 0 1 1 1 spam
5 0 1 0 0 spam
6 1 0 0 0 ham

A Bernoulli naive Bayes model is fit by plain counting (no smoothing). The new message "URGENT! Free!!" has block = 0, free = 1, prize = 0, urgent = 1. What is P(spam∣message)P(\text{spam} \mid \text{message}) after normalizing the two class scores?

a probability, e.g. 0.65