

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


load sagittal.data; intensity=reshape(sagittal,256*124,1); intensity=intensity(find( (intensity >=50)&(intensity<=250))); hist(intensity,100);
We will get 19,660 values for intensity which are gray scale values between 50 and 250 of the magnetic resonance image (MRI) of the human brain. Let f (yi) be the image intensity at pixel po- sition yi. From the intensity histogram, we see that the image intensity can be modelled as a two com- ponent Gaussian mixture
f (y) = pf 1 (y) + (1 − p)f 2 (y)
where f 1 ∼ N (μ 1 , σ^21 ) and f 2 ∼ N (μ 2 , σ 22 ). We will estimate parameters by maximizing the likeli- hood function using the EM algorithm.
θ^ ˆ = arg max θ
∏n
i=
f (xi|θ) = arg max θ
∑n
i=
ln f (xi|θ).
Figure 1: Left: mid sagittal brain image. Right: his- togram of image intensity.
This optimization problem is nontrivial when f is complex and it gives a motivation for the develop- ment of the EM algorithm. We augment the data with with latent (unobserved) data Xm^ such that the complete data Xc^ = (X, Xm). The density of Xc^ is denoted as
Xc^ = (X, Xm) ∼ f (xc) = f (x, xm).
The conditional density for the missing data Xm^ is
f (xm|x, θ) = f (x, xm|θ) f (x|θ)
Rearranging terms, f (x|θ) = f^ (x,x
m|θ) f (xm|x,θ).^ Taking logarithm, we get log-likelihood for the observed data
ln f (X|θ) = ln f (Xc|θ) − ln f (Xm|X, θ).
Take expectation with respect to f (xm|x, θ 0 ) on both sides so that the left side is taken as constant.
ln f (X|θ) = E[ln f (Xc|θ)|X, θ 0 ] −E[ln f (Xm|X, θ)|X, θ 0 ].
Q(θ|θ 0 , X) = E[ln f (Xc|θ)|X, θ 0 ].
We maximize the likelihood in the following fash- ion.
θ^ ˆj = arg max θ Q(θ|θˆj− 1 , X).
If the above procedure is iterated, we get the se- quence of estimators θˆ 0 , θˆ 1 , · · · and it can be shown that it converges to the maximum likelihood estima- tor θˆ. Proof. By the definition of θˆj+1,
Q(ˆθj+1|θˆj , x) ≥ Q(θˆj |θˆj , x).
Let R(θ|θ 0 , X) = E[ln f (Xm|X, θ)|X, θ 0 ]. It can be shown that
θ 0 = arg max θ
R(θ|θ 0 , x) (1)
Then R(θˆj+1|θˆj , x) ≤ R(θˆj |θˆj , x). Consequently
ln f (x|θˆj ) = Q(θˆj |θˆj , x) − R(θˆj |θˆj , x) ≤ Q(θˆj+1|θˆj , x) − R(θˆj+1|θˆj , x) ≤ ln f (x|θˆj+1).
This inequality guarantees the the sequence of es- timators θˆj monotonically increase the likelihood. Since the monotonically increasing sequence is bounded, i.e. ln f (x|θˆj ) ≤ ln f (x|θˆ), it must be converging to a stationary point but it is not clear if the limit is ln f (x|ˆθ). To guarantee that the limit converges to the maximum likelihood estimator, additional conditions are needed. See Boyles (J. Roy. Statisti. Soc. B. 1983) and Wu (Ann. Statist.
The difficulty of EM algorithm is at the E-step where we need to compute the conditional expec- tation Q(θ|θˆj− 1 , x). The Monte-Carlo EM algo- rithm overcome this by simulating missing data Xm^ ∼ f (xm|x, θ). so that
Q̂ (θ|θ 0 , x) =^1 l
∑^ l
j=
ln f (X, Xm|θ).
Problem 46. Prove inequality (1). Hint. Use Jensen’s inequality.
P (X 1 = x 1 , · · · , Xk = xk) =
n! x 1! · · · xk! px 1 1 · · · px kk ,
0.1 0 2 4 6 8 10 12 14 16 18 20
0.1 0 2 4 6 8 10 12 14 16 18 20
Figure 2: Left: convergence of EM algorithm. Right: Monte-Carlo EM algorithm.
where
∑k i=1 xi^ =^ n^ and^
∑k i=1 pi^ = 1.^ The fol- lowing example is motivated from Rao C.R. (Linear statistical inference and its applications, 1973) and simplified from k = 4 to k = 3. Suppose obser- vations x = (x 1 , x 2 , x 3 ) are from the multinomial M (n, 12 + p 4 , 1 − 2 p, p 4 ). Find the MLE of p. Solution. The observed likelihood is
L(p|x) ∝ (2 + p)x^1 (1 − p)x^2 px^3.
MLE can be computed if one is willing to do al- gebraic manipulation. Instead we augment data by additional data such that
xc^ = (z 1 , z 2 , x 2 , x 3 ) ∼ M (n,
p 4
1 − p 2
p 4
with x 1 = z 1 + z 2. The complete likelihood func- tion is L(p|xc) ∝ pz^2 +x^3 (1 − p)x^2. This is easier to manipulate than L(p|x). The conditional expected complete log-likelihood Q(p|p 0 , x) is
E[log L(p|Xc)|p 0 , x] ∝ Ep 0 [(Z 2 +x 3 ) log p+x 2 log(1−p)]
We can also show that Z 2 |X 1 = x 1 ∼ B
x 1 , (^) 2+pp
(check it yourself). So the E-step is
Q(p|p 0 , x) =
( (^) p 0 2 + p 0
x 1 +x 3
log p+x 2 log(1−p).
The M-step is also easy. Computing ∂Q/∂p = 0, we get p ˆ 1 =
p 0 2+p 0 x^1 +^ x^3 p 0 2+p 0 x^1 +^ x^2 +^ x^3
This gives a recursive formula to find pˆi.
clear p; x1=35;x2=50;x3=16; p(1)=0.9; for i=2: pr= p(i-1)/(2+p(i-1)) p(i) = (prx1 + x3)/(prx1+x2+x3); end; hold on; plot(p)