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