Docsity

GMM Parameter Estimation: Gaussian Mixture Model and EM Algorithm, Study Guides, Projects, Research of Computer Graphics

Partial preview of the text

Download GMM Parameter Estimation: Gaussian Mixture Model and EM Algorithm and more Study Guides, Projects, Research Computer Graphics in PDF only on Docsity!

GMM parameter estimationGMM parameter estimation

Xiaoye Lu^ Xiaoye Lu

CMPS290c Final Project^ CMPS290c Final Project

GMM introduction

  • Gaussian mixture Model
    • Combination of several gaussian components
      • Notation:
        • For each Gaussian distribution:

is

the mean and covariance matrix.

  • A GMM with

m

mixtures(components):

(

)

(

)

∑

=

m
i
i
i^

x

p

w

x

p

|

|

θ

θ

(

) m m w w w

θ

θ

θ

θ

, , , , , ,

,^

L

L

=

(

) i

i

i^

C ,

μ

θ

=

(

)

(

)

(

)

(

) ⎫⎬⎭

⎧⎨⎩

−

−

−

=

i
i
T
i
d
i^

x C x C x p

μ

μ

π

θ

1 2

exp

2

1

|

EM algorithm (Bad Initials)

EM algorithm

  • EM is an algorithm to maximize the

likelihood by fixing the other parameterin each iteration

  • Like K-Mean • Efficient when given good initial settings • Local optimum algorithm • No good online version for GMM

estimation

KM framework

  • A framework of online learning algorithm:
    • Find the update trading off the divergence in

the parameter domain with the divergence inthe labelling domain.

  • Divergence– Loss– Factor– To minimize:

(

) t

θ

θ

, ~

∆

(

)

|

S

Loss η

(

)

(

)

(

) θ η θ θ θ

~ |

, ~

~

S

Loss

S

U

t
t^

∆

=

Implicit vs Explicit

  • Too hard to solve implicit updating

equation:

  • Explicit Equation

(

)

(

)

(

) θ η θ θ θ

~ |

, ~

~

S

Loss

U

t
t

∆

=

(

)

(

)

(

) θ η θ θ θ

|

, ~

~

S

Loss

U

t
t^

∆

=

GMM JE updating

  • Lagrange Method to get the Minimum with

constraint

∑

=

=

m i^

i w 1

1

~

(

)

(

)

(

)

(

)

∑

=

m i^

i

t

t^

w

S

Loss

S

V

1

λ

θ

η

θ

θ

θ^ (

)

(

)

(

)

0

~

~ |

ln

~

, ~

ˆ

~

~

= + ∂ ∂ − ∂ ∆ ∂ = ∂ ∂

λ

ϖ

θ

η

ϖ

θ

θ

ϖ

θ

i

i

i t^

S

P

S

V

(

)

(

)

(

)

0

~

~ |

ln

~

, ~

ˆ

~

~

= ∂ ∂ − ∂ ∆ ∂ = ∂ ∂

i

i

i t^

S

P

S

V

μ

θ

η

μ

θ

θ

μ

θ (^

)

(

)

(

)

0

~

~ |

ln

~

, ~

ˆ

~

~

= ∂ ∂ − ∂ ∆ ∂ = ∂ ∂

i

i

i t

C

S P S C C V

θ

η

θ

θ

θ

GMM JE updating

  • To avoid future derivative in the loss

function, JE uses Taylor Expansion:

(

)

(

)

(

)

(

) θ θ θ θ θ

θ

|

~

|

~ |

S

Loss

S

Loss

S

Loss

∇ ⋅

−

=

(

)

(

)

θ

θ

θ

θ

|

~

~ |

S

Loss

S

Loss

∇

=

∂

∂

Updating Equations

On-Line Version

Batch Version

( )

Z

x

S

S x

i

i

i^

⎞⎟⎟ ⎠

⎛⎜⎜ ⎝

=

∑

∈

β

η

ϖ

ϖ

exp

~

( )

∑

∑

=

∈

m j

S x^

i

i^

x
S
Z

1

exp

β

η

ϖ

( )(

) i

S x

i

i

i^

x

x

S

μ

β

η

μ

μ

−

=

∑

∈

~

( )

( )

x S x S C C i

S x

i

i

i^

∑

∈

−

−

=

β

μ

1

1

~

(

)

(

) (

)

1

1

−

−

−

−

−

=

i

T i

i

i

i^

C x x C I x S

μ

μ

Z

x

i

i

i

ηβ

ϖ

ϖ

exp

∑

=

=

m j

i

i^

x

Z

1

exp

ηβ

ϖ ( )(

) i

i

i

i^

x

x

μ

ηβ

μ

μ

(

)

(

) x S x C C

i

i

i

i

μβ

−

−

1

1

( )

(

) (

)

1

1

−

−

−

−

−

=

i

T i

i

i

i^

C x x C I x S

μ

μ

Implicit Updating

  • Using future derivatives for loss function

(

)

(

)

Z

x

P

x

P

S

w

w

S x

i

i

i^

⎞⎟⎟⎠

⎛⎜⎜⎝

∑

∈

θ θ

η

~ | |

exp

~

(

)

(

)

(

)

(

)

⎤ ⎥ ⎥⎦

⎡ ⎢ ⎢⎣

⎞⎟ ⎟⎠

⎛⎜ ⎜⎝

=

∑

∑

∈

−

∈

S x

i

i

i

S x

i

i

i^

C

x

P

C x P S C x P

C

x

P

S

I

, ~ |

, ~ | , ~ |

, ~ |

~

1

μ^ μ

η

μ

μ μ

η

μ

(

)

(

)

(

)(

)

(

)

0 ~ ~ ~ ~ |

~ |

~

1

1

1

1

1

= + − − − +

− − − − ∈ −

∑

i i T i i i i S x

i

i^

C C x x C C x P

x

P

S

C

μ

μ

θ θ

η

Mean and Covariance

  • Fix • For quadratic equation of C, Using:
    • Root(s) of–

where

  • Need to check the validity of C

( )

(

)

(

) θ θ

α

| | x

P

x

P w

x

i

i

i^

=

( )

(

)

(

) θ^ θ

β

| | x

P

x

P

x

i

i^

=

(

)

(

)

(

)

(

)

⎤ ⎥ ⎥⎦

⎡ ⎢ ⎢⎣

⎞⎟ ⎟⎠

⎛⎜ ⎜⎝

=

∑

∑

∈

−

∈

S x

i

i

i

S x

i

i

i^

C

x

P

C x P S C x P

C

x

P

S

I

,

|

,

|

,

|

,

|

~

1

μ^ μ

η

μ

μ μ

η

μ

(

)

(

)

(

)(

)

(

)

0

~

~

| |

~

1

1

1

1

= + − − − +

−

−

−

∈

−

∑

i i T i i i S x

i

i^

C C x x C I x P

x

P

S

C

μ

μ

θ θ

η

0

~

~

~

=

Q C B C A C

i

i

i

[

] i

i

i

i^

C

T

C

BC

C

±

−

=

⇒

1 2

~

AQ

B

B

T

T

4

−

=

Learning Rate

  • For Online: Learning rate should get closer

to 0 as the data numbers increases.

  • For Batch: Learning rate is fixed.• For EM, we don’t have learning rate to

adjust.

( )

(

)

( )

⎧ ⎨ ⎩

> <=

=

100

0

100

0

01 . 0

t

t

t

t

η

η

η

Experiments I

  • Toy Data:
    • 2 mixtures (1 dimensional)– Weights:

[0.5, 0.5]

  • Mean:

[-1, 1]

  • Covariance

[0.5, 0.5]

W_Init = [0.2; 0.8];Mu_Init = [-0.5; 0.5];C_Init = [1/3; 1/3];eta0 = 1.05;

0

1

2

3

0

Final Approximation, Histogram

5000 Data HistogramTrue DistributionDensity got by Init Value S

e

Density got by Init Value S

e

Density got by Init Value S

e

Setting 1:

W_Init = [0.1; 0.9];Mu_Init = [-0.1; 0.1];C_Init = [0.1; 0.1];Setting 1:

W_Init = [0.2; 0.8];Mu_Init = [-0.5; 0.5];C_Init = [0.4; 0.4]; Setting 1:

W_Init = [0.4; 0.6];Mu_Init = [-0.9; 0.9];C_Init = [0.4; 0.4];

EM localization