szcf-weiya/ESL-CN

Fig. 8.6 and Tab. 8.2: Example for EM

szcf-weiya opened this issue · 2 comments

in R

pi = 0.554590232459113
Finish!
mu1 = 4.65591280772299
mu2 = 1.0831618075166
sigma1^2 = 0.818793570810866
sigma2^2 = 0.811370618556585

image

the estimations are (slightly) different the original.

in Julia

a variant version that assumes the ratio of sigma1/sigma2 is also provided

julia> μ1
1.0831617392634196

julia> μ2
4.655912729215212

julia> σ1^2
0.8113705078083597

julia> σ2^2
0.8187936852297709

julia> w
0.5545902120768698

which is quite close to the above calculated by R.

pi log-likelihood
image image