# Train Naive Based Classifier

For (a) I have calculated $$P(G)=\frac{5}{8}$$, $$P(O|G)=\frac{2}{5}$$, $$P(B|G)=\frac{1}{5}$$, $$P(C|G)=\frac{4}{5}$$, and $$P(A|G)=\frac{4}{5}$$. Now how do I calculate the maximum likelihood estimate of these values?

And how do I go about part (b)? I get that $$O,B,C,A$$ are independent so I can multiply them to get joint probability. But for values like $$O_i$$ for sample $$i=9$$, that is just $$0$$, since sample 9 doesn't have outdoor seating. And how am I supposed to calculate $$P(G_i)$$ if I don't know what $$G_9$$ is?

• Am I understanding this correctly for part (b)? For sample 9, I will calculate $P(G=1)P(O=0,B=1,C=0,A=1|G=1)$ and $P(G=0)P(O=0,B=1,C=0,A=1|G=0)$ and choose which ever one is higher. Is that correct? – IrCa May 14 at 16:37