Let's see the problem first,
posterior for vector's {w1, w2, w3, w4_ _ _ _ _ _ w_d}
P(y=1|w1,w2,w3,_ _ ,w_d) = P(y=1)*P(w1|y=1)*P(w2|y=1)P(w2|y=1) _ _ _ *P(w_d|y=1)
let assume the random probability of each LIKELIHOOD,
P(y=1|w1,w2,w3,_ _ ,w_d) = 0.6 * 0.2 * 0.23 * 0.04 * 0.001 * 0.45 * 0.012 _ SO ON
nowhere is a problematic situation while multiplication the LIKELIHOOD,
note:- In python, a float is rounded to some number of significant figures. it means you cannot gate correct results when you have numbers of likelihoods.
for solving this critical problem we use log probability.
the nice property of log is it's a monotonic function and it converts multiplication to addition and gives a fast and accurate result compared to a simple multiplication.
log(P(y=1|w1,w2,w3,_ _ ,w_d)) = log(P(y=1)*P(w1|y=1)*P(w2|y=1)P(w2|y=1) _ _ _ *P(w_d|y=1))
Now it's good
exp
at all. – Bename