I'am reading this example, but Could you explain a little more, I dont get the part when it says "then we Normalize"... I know
P(sun) * P(F=bad|sun) = 0.7*0.2 = 0.14
P(rain)* P(F=bad|rain) 开发者_C百科= 0.3*0.9 = 0.27
But where do they get
W P(W | F=bad)
-----------------
sun 0.34
rain 0.66
Example from
To normalize a list of numbers, you divide each by the sum of the list.
e.g. python
>>> v = [0.14, 0.27]
>>> s = sum(v)
>>> print s
0.41000000000000003
>>> vnorm = [n/s for n in v]
>>> print vnorm
[0.34146341463414637, 0.65853658536585369]
精彩评论