תרגול - Bayesian Learning
תרגול - Bayesian Learning
,
' .
# %
d " # ," % = ( ") − ")
)*+
! " = $ &'(&)
%
* Where p is the probability mass function (pmf)
§ For continuous variable:
,
! " = * &- & .&
+,
* Where f is the probability density function (pdf)
© Ben Galili IDC
¡ Random variable
¡ The variance:
! " = $%& ' = ([ * − , " ]
¡ The standard deviation (=square root of the
variance):
! = $%& ' = ([ * − , " ]
§ ! "|$2 =?
& '∩)3 /.,2
▪ = =0.75
&()3 ) /.,4
§ ! "|$5 =?
& '∩)6 /
▪ = =0
&()6 ) /.,
= argmax > − ℎ @. − A. 3
*∈,
.
= argmin > ℎ @. − A. 3
*∈,
.
24-".
© Ben Galili IDC
¡ But, this was good only for 1 attribute
¡ What if we have more than 1?
¡ In this case each likelihood probability will be
estimated according to multivariate normal
distribution
¡ For this we will need mean vector (each
dimension will be the mean for some
attribute) and the covariance matrix
és 11 s 12 ! s 1d ù é s 12 s 12 ! s 1d ù
ês ú ê ú
ê 21 s 22 ! " ú ês 21 s 22 ! " ú
S= =
ê " " # " ú ê " " # " ú
ê ú ê 2 ú
ës d 1 s d 2 ! s dd û êës d 1 s d 2 ! s d úû
9 : /-
-.#