Quiz Space

Machine Learning Techniques · End Term · 3 Sept 2023 · May 2023 term · Set QPD1-S1

Question 3: You are working on a text classification problem using a …

Question 3

+6 marksNumerical answer

You are working on a text classification problem using a Naive Bayes classifier to determine whether an email is "Spam" or "Not Spam" . You have trained your model using a dataset of 1000 emails, with 600 of them labeled as "Spam" and 400 labeled as "Not Spam." You've collected statistics on the occurrence of two words, "Won" and "Money" in these emails:

Keywordlabel of emailProbability
WonSpamP(Won∥Spam)=0.45P(\text{Won} \Vert Spam) = 0.45
WonNot SpamP(Won∥NotSpam)=0.05P(\text{Won} \Vert NotSpam) = 0.05
MoneySpamP(Money∥Spam)=0.3P(\text{Money} \Vert Spam) = 0.3
MoneyNot SpamP(Money∥NotSpam)=0.02P(\text{Money} \Vert NotSpam) = 0.02

You receive a new email containing both the "Won" and "Money" keywords and want to classify it using Naive Bayes.

Use the Naive Bayes formula to calculate the probability that the new email is classified as "Spam."

Hint: Assume that these are only two possible words (that is there are only two features)

Show answer

Correct answer: 0.99 (accepted within ±0.01)

Question 3 of 17 in the IIT Madras BS Machine Learning Techniques (MLT) End Term paper sat on 3 Sept 2023, in the May 2023 term (IIT M DIPLOMA ET1 EXAM QPD1 S2 03 Sep). It carries 6 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2Suppose you have been given a task of estimating the conversion rate of google click of new online advertisement campai…
  3. Q4Figure question
  4. Q5Figure question
  5. Q6Which of the following statements is/are true?
  6. Q7Figure question
  7. Q8Figure question
  8. Q9Figure question
  9. Q10Consider the following dataset with two features. | X | y | |---|---| | [1,1] | 1 | | [-1,-1] | 1 | | [2,2] | 3 | | [-2…
  10. Q11Figure question
  11. Q12While training a perceptron model, the weight vector at some iteration t is \mathbf{w}^t. The next two data-points pick…
  12. Q13Consider the following optimization problem involving the variable \mathbf{w} = \begin{bmatrix} w_1 & w_2 \end{bmatrix}…
  13. Q14You are working on a spam email classification problem. You have collected a dataset of some 1000 emails, labeled as ei…
  14. Q15Which of the following statements is/are true about the K-NN algorithm?
  15. Q16You are working on a binary classification problem where you need to predict whether an email is spam (1) or not (0). Y…
  16. Q17Consider a simple neural network with one hidden layer. The network has the following architecture: Input layer with 3 …