GATE DA 2025 · Naive Bayes Classifier

NAT · 1 mark · Problem ML-SVM-0015

The naive Bayes classifier is used to solve a two-class classification problem with class labels \(y_1, y_2\). Suppose the prior probabilities are \(P(y_1) = \frac{1}{3}\) and \(P(y_2) = \frac{2}{3}\). Assuming a discrete feature space with\(P(x|y_1) = \frac{3}{4} \quad \text{and} \quad P(x|y_2) = \frac{1}{4}\)for a specific feature vector \(x\). The probability of misclassifying \(x\) is (Round off to two decimal places)

Numerical answer (NAT).

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

Show the worked solution\(P(x,y_1)=P(x\mid y_1)P(y_1)=\dfrac34\times\dfrac13=\dfrac14\)\(P(x,y_2)=P(x\mid y_2)P(y_2)=\dfrac14\times\dfrac23=\dfrac16\)\(P(x)=\dfrac14+\dfrac16=\dfrac3{12}+\dfrac2{12}=\dfrac5{12}\)Posteriors: \(P(y_1\mid x)=\dfrac{1/4}{5/12}=\dfrac35=0.6\), \(P(y_2\mid x)=\dfrac{1/6}{5/12}=\dfrac25=0.4\)The Bayes-optimal classifier picks the class with the higher posterior (\(y_1\), at \(0.6\)). The misclassification probability is the probability of the class not chosen, i.e. \(P(y_2\mid x)=0.4\)Answer: 0.40

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