Docsity

Lecture Notes on Gaussian Mixture Model I | STAT 992, Study notes of Statistics

Toggle sidebar
bg1
Stat 992: Lecture 32
Gaussian mixture model I.
Moo K. Chung [email protected]
December 14, 2003
1. Gaussian mixture model. Download data and run
the following MATLAB code.
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) = pf1(y) + (1 −p)f2(y)
where f1∼N(µ1, σ2
1)and f2∼N(µ2, σ2
2). We
will estimate parameters by maximizing the likeli-
hood function using the EM algorithm.
2. Expectation-maximization (EM) method is an it-
erative method for maximizing difficult likelihood
problems. It was first introduced by Dempster et
al. (J. Roy. Statist. Soc. 1997). Read Robert and
Casella’s Monte Carlo Statistical Methods for the
introduction to EM. Flury’s A First Course in Mul-
tivariate Statistics for the detailed discussion on EM
applied to Gaussian mixture model. See Little and
Rubin (1987) and McLachlan and Krishnan (1997).
EM is widely used in imaging. Instead of classify-
ing pixels into classes, it is possible to assign the
probability belong to classes (SPM’99 segmenta-
tion algorithm).
Suppose we have a random sample X=
{X1,· · · , Xn} ∼ f(x|θ). We wish to find the max-
imum likelihood estimator of θ:
ˆ
θ= arg max
θ
n
Y
i=1
f(xi|θ) = arg max
θ
n
X
i=1
ln f(xi|θ).
Figure 1: Left: mid sagittal brain image. Right: his-
togram of image intensity.
This optimization problem is nontrivial when fis
complex and it gives a motivation for the develop-
ment of the EM algorithm. We augment the data
with with latent (unobserved) data Xmsuch that
the complete data Xc= (X, X m). The density of
Xcis denoted as
Xc= (X, X m)∼f(xc) = f(x, xm).
The conditional density for the missing data Xmis
f(xm|x, θ) = f(x, xm|θ)
f(x|θ).
Rearranging terms, f(x|θ) = f(x,xm|θ)
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].
3. Following Robert and Casella, denote the expected
log-likelihood for the complete data by
Q(θ|θ0, X) = E[ln f(Xc|θ)|X , θ0].
pf2

Partial preview of the text

Download Lecture Notes on Gaussian Mixture Model I | STAT 992 and more Study notes Statistics in PDF only on Docsity!

Stat 992: Lecture 32

Gaussian mixture model I.

Moo K. Chung [email protected]

December 14, 2003

  1. Gaussian mixture model. Download data and run the following MATLAB code.

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.

  1. Expectation-maximization (EM) method is an it- erative method for maximizing difficult likelihood problems. It was first introduced by Dempster et al. (J. Roy. Statist. Soc. 1997). Read Robert and Casella’s Monte Carlo Statistical Methods for the introduction to EM. Flury’s A First Course in Mul- tivariate Statistics for the detailed discussion on EM applied to Gaussian mixture model. See Little and Rubin (1987) and McLachlan and Krishnan (1997). EM is widely used in imaging. Instead of classify- ing pixels into classes, it is possible to assign the probability belong to classes (SPM’99 segmenta- tion algorithm). Suppose we have a random sample X = {X 1 , · · · , Xn} ∼ f (x|θ). We wish to find the max- imum likelihood estimator of θ:

θ^ ˆ = 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 ].

  1. Following Robert and Casella, denote the expected log-likelihood for the complete data by

Q(θ|θ 0 , X) = E[ln f (Xc|θ)|X, θ 0 ].

We maximize the likelihood in the following fash- ion.

  1. E-step: compute Q(θ|θˆj− 1 , X).
  2. M-step: maximize Q(θ|ˆθj− 1 , X) and take

θ^ ˆ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.

  1. Multinomial example. X = (X 1 , · · · , Xn) ∼ M (n, p 1 , p 2 , · · · , pk− 1 , pk) is multinomial if

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)