maximum likelihood estimator ii - embedded and signal ... · 10 maximum likelihood estimator ii...

65
10 10 Maximum Likelihood Estimator Maximum Likelihood Estimator II II II II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering d and Graduate School of Electrical Engineering Mahanakorn University of Technology Advanced Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon 1 Mahanakorn University of Technology

Upload: others

Post on 20-Sep-2019

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

1010Maximum Likelihood EstimatorMaximum Likelihood Estimator

IIIIIIIIAsst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC

Department of Electronic Engineering dand

Graduate School of Electrical Engineering Mahanakorn University of Technology

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

1

Mahanakorn University of Technology

Page 2: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ตวประมาณคาควรจะเปนสงสดตวประมาณคาควรจะเปนสงสดในทางในทางปฎบตปฎบต

ป ป• จากตอนทแลว ตวประมาณคาควรจะเปนสงสดนน ถาหากพจารณาในกรณจานวนขอมลขนาดใหญแลว จะเปนตวประมาณคาแบบไรไบแอส

• และยงสามารถใหแปรปรวนตาสดไดถง CRLB และมการกระจายเปนเกาสดวย

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

2

Page 3: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

สญลกษณสญลกษณสญลกษณสญลกษณ

การกระจายในเชง แบบเชงเสนกากบ

1ˆ ( )a

Iθ θ θ−N แบบเชงเสนกากบ

1, ( )MLE Iθ θ θN ∼

คาผกผนของคาฟชคาผกผนของคาฟชเชอรอนฟอรเมชน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

3

Page 4: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

วธมอนตวธมอนตคารโลคารโล((Monte Carlo MethodMonte Carlo Method))

ป ใ • เนองจากการหาคาควรจะเปนในทางทฤษฎนนไมไดงายดายนก ดงนนเราจงหนมาหา กระบวนการทางตวเลขทสามารถจะทาไดทเรยกวาเรยกวา

มอนตคารโล (Monte Carlo)

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

4

Page 5: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

คาเฉลยกลางและความแปรปรวนคาเฉลยกลางและความแปรปรวนคาเฉลยกลางและความแปรปรวน คาเฉลยกลางและความแปรปรวน

M1ˆ{ }M

iE A AM

= ∑1

{ } iiM =∑

( )21ˆ ˆ ˆvar( ) { }M

i iA A E A= −∑( )1

var( ) { }i ii

A A E AM =

= ∑

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

5

Page 6: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

M=M=50005000M=M=50005000 ใ • กาหนดใหคาจรง (True value) ของ A เทากบ 1

• จานวนของ N มคาแตกตางกนจานวนของ N มคาแตกตางกน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

6

Page 7: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ฮสฮสโตแกรมโตแกรม (Histogram)(Histogram)ฮสฮสโตแกรม โตแกรม (Histogram) (Histogram)

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

7

Page 8: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

คาประมาณจากวธมอนตคาประมาณจากวธมอนตคารโลคารโลคาประมาณจากวธมอนตคาประมาณจากวธมอนตคารโลคารโล1ˆ{ }M

E A A= ∑ ( )21ˆ ˆ ˆvar( ) { }M

A A E A= −∑1

{ } ii

E A AM =

= ∑ ( )1

var( ) { }i ii

A A E AM =

= −∑

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

8

Page 9: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

การคานวณหาการคานวณหา MLE MLE โดยโดยกระบวนการเชงตวเลข กระบวนการเชงตวเลข

ป • เราสามารถคานวณหาคาตวประมาณคาแบบMLE นไดจากกรรมวธ กระบวนการเชงตวเลข (Numerical Methods)

• วธของนวตน (Newton)• วธของนวตน (Newton)

• กรรมวธของนวตน-ฟรเยร (Newton-Fourier Method)

• นวตน-ราฟสน (Newton-Raphson)• นวตน-ราฟสน (Newton-Raphson)

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

9

Page 10: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

• ตวอยางท 6.3 หากมสญญาณขอมลจากการสงเกตการณเปน

( ) ( ) 0 1nx n r w n n N+( ) ( ), 0, , 1nx n r w n n N= + = −…

2( ) (0 )w n σN∼( ) (0, )ww n σN∼

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

10

Page 11: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

โ ป ป • โดยคาพารามเตอร r นนเปนตวประกอบเลขชกาลงทตองการประมาณคาและคาทควรจะเปนสาหรบ r กคอ คาทมากกวา 0

• ตวประมาณคาควรจะเปนสงสด สาหรบ r น ก• ตวประมาณคาควรจะเปนสงสด สาหรบ r น กคอเปนการหาคาสงสด (Maximisation) ของฟ ปฟงกชนคาควรจะเปน (Likelihood function)

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

11

Page 12: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

11 1 N−⎡ ⎤( )

12

2 20

1 1( ; ) exp ( )

(2 ) 2

Nn

w w n

p r x n rπσ σ =

⎡ ⎤⎢ ⎥= − −⎢ ⎥⎣ ⎦

∑x0( )w w n=⎣ ⎦

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

12

Page 13: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

• สงเกตวาคาทนอยทสดของเทอม

( )1

21( )

N

x n r−

−∑ ( )20

( )2 w n

x n rσ =

• ทาใหคาควรจะเปน มคามากสด

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

13

Page 14: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ไ • สมการแบบไมเชงเสน (Non-linear equation)

1 1N N

( ) ( )1 1( )

( ) ( )N N

n nJ rx n r x n r

r r

− −∂ ∂= − −

∂ ∂∑ ∑

( )

0 01

1( )

n nN

n n

r r= =−

∂ ∂

∑( ) 1

0

( ) n n

n

x n r nr −

=

= − −∑

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

14

Page 15: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ฟงกชนเปาหมายฟงกชนเปาหมายฟงกชนเปาหมายฟงกชนเปาหมาย

( )1

2( ) ( )

NnJ

( )2( ) ( ) nJ r x n r= −0n=

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

15

Page 16: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

• ตองการ( )J r∂ ( )

0J rr

∂=

∂• จงเทยบเทา r∂

1N

( )1

1( ) 0N

n nx n r nr−

−− =∑0n=

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

16

Page 17: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ln ( ; )p θ∂ xln ( ; )0

pr

θ∂=

∂xr∂

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

17

Page 18: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

การหาคาคาตอบแบบวนซา การหาคาคาตอบแบบวนซา (Iterative(Iterative Method)Method)

• กาหนด

ln ( ; )( )

pg

θθ

∂=

x( )g θ

θ=

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

18

Page 19: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ฟงกชนเชงเสนฟงกชนเชงเสนฟงกชนเชงเสนฟงกชนเชงเสนป ป ฟ • การกระจายเปนแบบเกาส ความชนเปนฟงกชน

เชงเสน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

19

Page 20: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ฟงกชนไมเปนเชงเสนฟงกชนไมเปนเชงเสนฟงกชนไมเปนเชงเสน ฟงกชนไมเปนเชงเสน • การกระจายแบบเรยลห (Rayleigh Distribution)

2

( ) expx x

p x b⎛ ⎞⎟⎜ ⎟= −⎜2 2( ) exp

2p x b

b b⎟= −⎜ ⎟⎜ ⎟⎜⎝ ⎠

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

20

Page 21: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

0 5b = ไ ป ฟ

0.5b =• การกระจายแบบเรยล ความชนไมเปนฟงกชน

เชงเสน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

21

Page 22: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

การประมาณคาความชนการประมาณคาความชนการประมาณคาความชนการประมาณคาความชน • อนกรมเทยเลอร (Taylor series) อนดบทหนง

( )d θ0 0

( )( ) ( ) ( )

dgg g

θ θ θ θθ

≈ + −0

0 0( ) ( ) ( )d θ θθ =

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

22

Page 23: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )( ) ( ) ( )

dg θθ θ θ θ

0

1 0 1 0( )

( ) ( ) ( )g

g gd θ θ

θ θ θ θθ =

≈ + −0θ θ

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

23

Page 24: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ทจดตาสดทจดตาสด ( ) 0g θ =ทจดตาสด ทจดตาสด 1( ) 0g θ =

( )0 ( ) ( )

dg θθ θ θ≈ +0 1 0

( )0 ( ) ( )

gg

d θ θθ θ θ

θ =≈ + −

0θ θ=

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

24

Page 25: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )θ01 0

( )g θθ θ= −1 0 ( )dgθ θ

θd θ θθ

0d θ θθ =

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

25

Page 26: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

วธของวธของนวนวตนตน ราฟราฟสนสนวธของวธของนวนวตนตน--ราฟราฟสนสน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

26

Page 27: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ln ( ; )( )

pg

θθ

θ∂

=∂xθ∂12 ln ( ; ) ln ( ; )p pθ θ

−⎡ ⎤∂ ∂x x1 2

ln ( ; ) ln ( ; )

k

k kp p

θ θ

θ θθ θ

θθ+=

⎡ ⎤∂ ∂⎢ ⎥= − ⎢ ⎥ ∂∂⎣ ⎦

x x

k

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

27

Page 28: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

อนพนธอนดบทหนงอนพนธอนดบทหนงอนพนธอนดบทหนงอนพนธอนดบทหนง

1N

( )1

12

( ; ) 1( )

Nn np r

x n r nr−

−∂= −

∂ ∑x ( )20w nr σ =∂ ∑

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

28

Page 29: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

อนพนธอนดบทสองอนพนธอนดบทสองอนพนธอนดบทสองอนพนธอนดบทสอง

2 1 12 2 2( ; ) 1

( 1) ( ) (2 1)N N

n np rn n x n r n n r

− −− −

⎡ ⎤∂ ⎢ ⎥= − − −⎢ ⎥∑ ∑x2 2

0 0

12

( 1) ( ) (2 1)

1

w n n

Nn n

n n x n r n n rr σ = =

⎢ ⎥∂ ⎣ ⎦∑ ∑

∑ 22

0

1[( 1) ( ) (2 1) ]n n

w n

nr n x n n rσ

=

= − − −∑

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

29

Page 30: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

rθ =k krθ =

( )1

1( )N

n nx n r nr−

−∑ ( )0

1 1

( ) k kn

k k N

x n r nr

r r =+ −

−= −

∑1

2

0

[( 1) ( ) (2 1) ]N

n nk k

n

nr n x n n r+

=

− − −∑0n=

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

30

Page 31: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

การลเขาของคาการลเขาของคา rkrk ทคาเรมตนตางๆทคาเรมตนตางๆการลเขาของคา การลเขาของคา rkrk ทคาเรมตนตางๆทคาเรมตนตางๆ

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

31

Page 32: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

การหาคาคาดหวงสงสดการหาคาคาดหวงสงสดExpectation Expectation MaximisationMaximisation

ป ป• เปนอกหนงกรรมวธการหาตวประมาณคาควรจะเปนสงสดแบบวนซา (Iterative) ( )

• EM นนเหมาะกบในบางสถานการณนนทตองการประมาณคาขอมลทขาดหายหรอไมตองการประมาณคาขอมลทขาดหายหรอไมสมบรณ (Incomplete data)

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

32

Page 33: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

• x นนเรยกวา ขอมลทสมบรณ (Complete data)

• สวนขอมล y ทไดมาจากการสงเกตการณนนจะสวนขอมล y ทไดมาจากการสงเกตการณนนจะเรยกวา ขอมลทไมสมบรณ (Incomplete data)

( )T=y x( )Ty xAdvanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

33

Page 34: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

• ตวอยางท 6.4 สมมตวาระบบรบสญญาณหนงมสายอากาศททาหนาทรบสญญาณอยหาตน ญญ

• ซงแตละตนมความสามารถของการรบสญญาณไมเทากน โดยจะสงเกตไดจากคา joint pdf ของไมเทากน โดยจะสงเกตไดจากคา joint pdf ของสญญาณทรบจากสายอากาศ

• โดยมคาคงท pi เปนตวแสดงความไมเทาเทยมกนของสายอากาศแตละตนกนของสายอากาศแตล ตน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

34

Page 35: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

สญญาณมครบสมบรณสญญาณมครบสมบรณสญญาณมครบสมบรณสญญาณมครบสมบรณ

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

35

Page 36: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ป • เราสามารถหาสมการคาควรจะเปนของการรบสญญาณรวมจากสายอากาศทงหาตนนไดจากญญการกระจายแบบมลตโนเมยล (Multinomial distribution) ซงอยในรปของ pdf แบบมdistribution) ซงอยในรปของ pdf แบบมเงอนไข (Conditional pdf)

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

36

Page 37: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

0 0 2 3 40 1 2 3 4 1 1 1 1 1 1 1

( )x x x x xx x x x x

p π π π π π+ + + + ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞⎟ ⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜ ⎜= − −⎟ ⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜ ⎜⎜ ⎜ ⎜ ⎜ ⎜x

0 1 2 3 4

( )! ! ! ! ! 2 4 4 4 4 4 4

px x x x x

π π π π π= ⎟ ⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜ ⎜⎟ ⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜ ⎜⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠x

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

37

Page 38: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

0 10 1 2 3 4( ) 1 1

! ! ! ! ! 2 4

x xp x x x x xx x x x x

ππ

π π π π∂ ∂ + + + + ∂ ⎛ ⎞ ∂ ⎛ ⎞⎟ ⎟⎜ ⎜= + +⎟ ⎟⎜ ⎜⎟ ⎟⎜ ⎜⎝ ⎠ ⎝ ⎠∂ ∂ ∂ ∂x

2 3 4

0 1 2 3 4! ! ! ! ! 2 4

1 1 1 1 14 4 4 4 4

x x x

x x x x xπ π π π

π π ππ π π

⎝ ⎠ ⎝ ⎠∂ ∂ ∂ ∂

∂ ⎛ ⎞ ∂ ⎛ ⎞ ∂ ⎛ ⎞⎟ ⎟ ⎟⎜ ⎜ ⎜+ − + − +⎟ ⎟ ⎟⎜ ⎜ ⎜⎟ ⎟ ⎟⎜ ⎜ ⎜⎝ ⎠ ⎝ ⎠ ⎝ ⎠∂ ∂ ∂

1 2 3 4

4 4 4 4 41 1 1 14 4 4 41 1 1 1 1 1

x x x x

π π π⎝ ⎠ ⎝ ⎠ ⎝ ⎠∂ ∂ ∂

= − − +

2

1 1 1 1 1 14 4 4 4 4 4

1 1 x

π π π π+

− −

⎛ ⎞⎟⎜ 3 1 1x ⎛ ⎞⎟⎜+21 4 4x π⎟⎜ − −⎟⎜ ⎟⎝ ⎠

=

344 4 4 4

1 14 4

xπ π π

π π

⎟⎜− + − ⎟⎜ ⎟⎝ ⎠⎛ ⎞⎟⎜ − ⎟⎜ ⎟⎝ ⎠

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

384 4 ⎟⎝ ⎠

Page 39: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( ) 1 1 1 1∂ ⎛ ⎞ ⎛ ⎞2 31 4

( ) 1 1 1 10

4 4 4 4 4 4p x x

x xπ

π π π ππ

∂ ⎛ ⎞ ⎛ ⎞⎟ ⎟⎜ ⎜= − − − + − =⎟ ⎟⎜ ⎜⎟ ⎟⎜ ⎜⎝ ⎠ ⎝ ⎠∂x

( ) ( )1 2 3 4 1 4 0x x x x x xπ+ + + − + =

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

39

Page 40: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

1 4ˆ lx x

π+

=1 2 3 4

ml x x x xπ

+ + +

• จะพบวาหากขอมลมความสมบรณ ( หาคา x ได ) ทกตว) การคานวณหาคาของ pi นนกจะ

สามารถทาไดโดยงาย เชนดงขางตน Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

40

Page 41: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

สญญาณไมครบสมบรณสญญาณไมครบสมบรณสญญาณไมครบสมบรณสญญาณไมครบสมบรณ

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

41

Page 42: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ไ • สญญาณทสงเกตการณไดสญญาณหนงเกดจากการรวมสญญาณจากสายอากาศมากกวาญญหนงตน นนกจะทาใหเราไมสามารถแยกออกไดวาสญญาณทรบมาจากแตละตนนนเปนอยางไรวาสญญาณทรบมาจากแตละตนนนเปนอยางไร

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

42

Page 43: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

y x x= +1 0 1y x x

y x

= +=2 2y x

y x

==3 3y x

y x

=

4 4y x=

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

43

Page 44: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

1 2 3 41 2 3 4 1 1 1 1 1 1 1

( )y y y yy y y y

p π π π π π+ + + ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜= + − −⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜y1 2 3 4

( )! ! ! ! 2 4 4 4 4 4 4

py y y y

π π π π π= + ⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠y

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

44

Page 45: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( ) ( )2ˆ ˆ2 2 2 0y y y y y y y y yπ π+ + + − − − − − =( ) ( )1 2 3 4 1 2 3 4 42 2 2 0ml mly y y y y y y y yπ π+ + + − − − − − =

• แตสงเกตวานเปนสมการทแกไดยากกวา• จะใช Expectation Maximisation ในการ

แกปญหาแกปญหา Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

45

Page 46: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ทฤษฎของทฤษฎของเบยสเบยส((BayesBayes’ theorem)’ theorem)

ใ • เราเรมจากการใชทฤษฎของเบยส (Bayes’ theorem))

( ; ) ( ; ) ( ; )p p pθ θ θ=x x y y( ; ) ( ; ) ( ; )p p pθ θ θx x y y

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

46

Page 47: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

Take LogTake LogTake LogTake Log

ln ( ; ) ln ( ; ) ln ( ; )p p pθ θ θ= −y x x yln ( ; ) ln ( ; ) ln ( ; )p p pθ θ θ= −y x x y

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

47

Page 48: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

หาคาคาดหวงหาคาคาดหวงหาคาคาดหวงหาคาคาดหวง

{ } { } { }ˆ ˆ ˆln ( ; ) ; ln ( ; ) ; ln ( ; ) ;E p E p E pθ θ θ θ θ θ′ ′ ′= −y y x y x y y

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

48

Page 49: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( ) ( )ˆ ˆl ( ) U Vθ θ θ θ θ′ ′ ′( ) ( )ln ( ; ) , ,p U Vθ θ θ θ θ′ ′ ′= −y

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

49

Page 50: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ป ป ˆ• หากคาประมาณ ณ ขณะนนเปนคาจรง ( ) ดงนนคาลอกของฟงกชนคาควรจะเปน (log-

θ θ=

( glikelihood) ใดๆ จะมคาสงสดเมอ ดวยθ θ′ =

ˆ ˆ ˆ( ) ( )V Vθ θ θ θ′ ≤( , ) ( , )V Vθ θ θ θ′ ≤

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

50

Page 51: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ป ′• ซงจะแปลวา หากยงมคาของ จนกระทงθ ′

ˆ ˆ ˆ( ) ( )U Uθ θ θ θ′ >( , ) ( , )U Uθ θ θ θ>

• จะไดวาคาลอกของคาควรจะเปน (log- ไ likelihood) นนกยงสงกวาไดอก

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

51

Page 52: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ˆln ( ; ) ln ( ; )p pθ θ′ >y yln ( ; ) ln ( ; )p pθ θ>y y

• ซงนกคอสงทเปนพนฐานของอลกอรธม EM ซง ปเขยนเปน

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

52

Page 53: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

EM AlgorithmEM AlgorithmEM AlgorithmEM Algorithm

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

53

Page 54: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

ใ • ลองใชขอมลเฉพาะชดหนงตวเลขเพอแสดงการใชอลกอรธม EM ในการหาผลลพธ ตวประมาณคาควรจะเปนสงสด

{ } { }1 2 3 4, , , 175,23,38,29y y y y ={ } { }1 2 3 4

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

54

Page 55: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

24 62056+24 62056ˆ 0.5153

530mlπ+

= =530

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

55

Page 56: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

0 1 2 3 40

0 1 2 3 4

1ln ( ) ln ln

! ! ! ! ! 2x x x x x

p xx x x x x

π+ + + + ⎛ ⎞⎟⎜= + ⎟⎜ ⎟⎜⎝ ⎠

x0 1 2 3 4

1 2 3 4

! ! ! ! ! 2

1 1 1 1 1 1ln ln ln ln

4 4 4 4 4 4

x x x x x

x x x xπ π π π

⎝ ⎠

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜+ + − + − +⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜⎟ ⎟ ⎟ ⎟⎜ ⎜ ⎜ ⎜⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠4 4 4 4 4 4⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

56

Page 57: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )( ) ( ) ( )0 1

0 1

23 38 29ˆ ˆ ˆ, {ln ( ) ; } ln ;

! !23!38!29!i i ix x

U E p Ex x

π π π π π⎧ ⎫⎪ ⎪+ + + +⎪ ⎪′ ′= = ⎨ ⎬⎪ ⎪⎪ ⎪⎩ ⎭

x y y

( ) ( )0 1

1 1 1 1ˆ ˆ { ; } ln { ; }ln 23 ln

2 4 4 4i iE x E xπ π π π

⎩ ⎭⎛ ⎞ ⎛ ⎞ ⎛ ⎞⎟ ⎟ ⎟⎜ ⎜ ′ ⎜ ′+ + + −⎟ ⎟ ⎟⎜ ⎜ ⎜⎟ ⎟ ⎟⎜ ⎜ ⎜⎝ ⎠ ⎝ ⎠ ⎝ ⎠

y y

1 1 38 ln

4 4π′+ −

129 ln

⎛ ⎞ ⎛ ⎞⎟ ⎟⎜ ⎜ ′+⎟ ⎟⎜ ⎜⎟ ⎟⎜ ⎜⎝ ⎠ ⎝ ⎠

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

57

Page 58: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( ) ( )00

( )

12ˆ{ ; } 175 1 1

i i

ix E x π =y

( )

( )

1 1ˆ

2 41

ˆ

i

i

π+

( )

( ) ( )11

( )

4ˆ{ ; } 175 1 1ˆ

i

i i

ix E x

ππ

π=

+y

( )

2 4π+

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

58

Page 59: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )( 1) ( )ˆ ˆi iU+ ′( )( 1) ( )ˆ ˆargmax ,i iUπ

π π π+

′′=

π

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

59

Page 60: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )i∂ ′ ( )ˆ, 0iU π π∂ ′ =′∂π′∂

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

60

Page 61: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )( ) ( )0 1 23 38 29ˆ ˆ, ln ;

! !23!38!29!i ix x

U Ex x

π π ππ π

⎧ ⎫⎪ ⎪∂ ∂ + + + +⎪ ⎪′ = ⎨ ⎬⎪ ⎪′ ′∂ ∂y( )

0 1

( ) ( )0 1

! !23!38!29!

1 1 1 1 ln ln 23 ln

2 4 4 41 1 1

i i

x x

x x

π π

π ππ π π

⎪ ⎪∂ ∂ ⎪ ⎪⎩ ⎭∂ ⎛ ⎞ ∂ ⎛ ⎞ ∂ ⎛ ⎞⎟ ⎟ ⎟⎜ ⎜ ′ ⎜ ′+ + + −⎟ ⎟ ⎟⎜ ⎜ ⎜⎟ ⎟ ⎟⎜ ⎜ ⎜⎝ ⎠ ⎝ ⎠ ⎝ ⎠′ ′ ′∂ ∂ ∂∂ ⎛ ⎞ ∂ ⎛ ⎞1 1 1

38 ln 29 ln4 4 4

π ππ π∂ ⎛ ⎞ ∂ ⎛ ⎞⎟ ⎟⎜ ′ ⎜ ′+ − +⎟ ⎟⎜ ⎜⎟ ⎟⎜ ⎜⎝ ⎠ ⎝ ⎠′ ′∂ ∂

( ) ( )( )1

1 1 161 29

4 4 4ix −( ) ( )1

( )

4 4 41 1 1 14 4 4 4

1 1 1 1 161 29i

π π π= + +

′ ′ ′−

⎛ ⎞ ⎛ ⎞⎟ ⎟′ ′ ′⎜ ⎜( )1 61 29

4 4 4 4 41 14 4

ix π π π

π π

⎟ ⎟′ ′ ′⎜ ⎜− − + −⎟ ⎟⎜ ⎜⎟ ⎟⎝ ⎠ ⎝ ⎠=

⎛ ⎞⎟′ ′⎜ − ⎟⎜ ⎟⎝ ⎠

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

61

Page 62: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

( )( )

( )( 1) 1ˆ

29i

ii U

xπ ππ π+ ′∂

+′ ( )( )( ) 1,( )01 90

Uix

π π

ππ π+ ∂

=′∂

= =+

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

62

Page 63: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

คาประมาณของคาประมาณของ xx00 และและ xx11คาประมาณของ คาประมาณของ xx0 0 และ และ xx1 1

X0=139 1482X0=139.1482

x1=35 851736x1=35.851736

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

63

Page 64: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

คาประมาณของคาประมาณของ πคาประมาณของคาประมาณของ π

p=0.515303

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

64

Page 65: Maximum Likelihood Estimator II - Embedded and Signal ... · 10 Maximum Likelihood Estimator II Asst. Prof. Dr. Peerapol Yuvapoositanon, PhD, DIC Department of Electronic Engineering

สรปสรปสรปสรป

ใ ใ• เราสามารถใชกระบวนการเชงตวเลขในการหาคาตอบ MLE เชน วธนวตน-ราฟสน ทใชกรณทฟงกชนเปาหมายมความไมเปนเชงเสนได

• EM ใชสาหรบการหาตวประมาณคาในกรณท• EM ใชสาหรบการหาตวประมาณคาในกรณทขอมลทตองการบางตวซอนอยในขอมลตวอนๆ

ไ หรอเรยกวาขอมลไมสมบรณ

Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com

Asst. Prof. Dr. P.Yuvapoositanon

65