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?

Topic homework naive-bayes-classifier

Category Data Science


  1. Done: MLE is a somewhat abstractly defined concept, but in essence it is your best guess at a parameter. In this case we assume that the observed frequency is your best guess.
  2. You want to calculate the probabilty of your observation (HasOutdoorSeating=0 in this case), given IsGoodRestaurant=1. That probability is not 0 (check the first sample for instance)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.