You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we attempt to classify a document, we multiply a lot of probabilities together to
get the probability that a document belongs to a given class. This will look something
like p(w0|1)p(w1|1)p(w2|1). If any of these numbers are 0, then when we multiply
them together we get 0. To lessen the impact of this, we’ll initialize all of our occurrence counts to 1, and we’ll initialize the denominators to 2
First of all, huge thanks for creating an understandable ML book.
Coming back to question now:
I perfectly, understood the idea behind setting p0Num and p1Num to np.ones, but why you have set p0Denom and p1Denom both to 2?
The text was updated successfully, but these errors were encountered:
First of all, huge thanks for creating an understandable ML book.
Coming back to question now:
I perfectly, understood the idea behind setting
p0Num
andp1Num
tonp.ones
, but why you have setp0Denom
andp1Denom
both to 2?The text was updated successfully, but these errors were encountered: