GATE DA 2024 · Naive Bayes Classifier

MCQ · 1 mark · Problem ML-NBAY-0009

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 Naive Bayes classifier is:
  1. A
    \(2^K + 1\)
  2. B
    \(2K + 1\)
  3. C
    \(2^{K+1} + 1\)
  4. D
    \(K^2 + 1\)

Solve it on GATE DA practice →More Supervised Learning — Classification problems

Show the worked solution\[\boxed{\#\text{params}=\underbrace{1}_{P(y_1)}+\underbrace{2K}_{P(x_i=1\mid y)}}\]Class prior: \(P(y_1)+P(y_2)=1\), so only \(P(y_1)\) is free: \(1\) parameter.Class-conditionals: under the naive Bayes assumption \(P(\mathbf x\mid y)=\prod_{i=1}^{K}P(x_i\mid y)\). Each binary attribute needs only \(P(x_i=1\mid y)\), for each of the \(2\) classes: \(2K\) parameters.Total \(=2K+1\).(Without the naive assumption each class needs a full table over the \(2^{K}\) attribute patterns: \(2(2^{K}-1)+1=2^{K+1}-1\) parameters, exponential in \(K\). Options (A) and (C) are of that exponential kind; naive Bayes needs only a linear number.)Answer: B

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com