GATE DA 2024 | Question 20

MCQ · 1 mark · −0.33

Given a dataset with \(K\) binary-valued attributes (where \(K > 2\)) for a two-class classification task, the number of parameters to be estimated for learning a naïve Bayes classifier is

  1. Option A: \(2^{K} + 1\)
  2. Option B: \(2K + 1\) (correct)
  3. Option C: \(2^{K+1} + 1\)
  4. Option D: \(K^{2} + 1\)

Answer

(B)

Explanation

Naïve Bayes assumes that the attributes are conditionally independent given the class, so it needs only these parameters:

  • the class prior \(P(y = 1)\): one parameter, because \(P(y = 0) = 1 - P(y = 1)\);
  • for each of the 2 classes and each of the \(K\) attributes, \(P(x_{k} = 1 \mid y)\): \(2K\) parameters, because \(P(x_{k} = 0 \mid y)\) follows from it.

The total is \(2K + 1\). Counts that grow like \(2^{K}\) (A and C) are what a model of the full joint distribution of the attributes within each class would need, which is exactly what the independence assumption avoids.

Answer: B