Upload
others
View
14
Download
0
Embed Size (px)
Citation preview
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
ตวประมาณคาควรจะเปนสงสดตวประมาณคาควรจะเปนสงสดในทางในทางปฎบตปฎบต
ป ป• จากตอนทแลว ตวประมาณคาควรจะเปนสงสดนน ถาหากพจารณาในกรณจานวนขอมลขนาดใหญแลว จะเปนตวประมาณคาแบบไรไบแอส
• และยงสามารถใหแปรปรวนตาสดไดถง CRLB และมการกระจายเปนเกาสดวย
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
2
สญลกษณสญลกษณสญลกษณสญลกษณ
การกระจายในเชง แบบเชงเสนกากบ
1ˆ ( )a
Iθ θ θ−N แบบเชงเสนกากบ
1, ( )MLE Iθ θ θN ∼
คาผกผนของคาฟชคาผกผนของคาฟชเชอรอนฟอรเมชน
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
3
วธมอนตวธมอนตคารโลคารโล((Monte Carlo MethodMonte Carlo Method))
ป ใ • เนองจากการหาคาควรจะเปนในทางทฤษฎนนไมไดงายดายนก ดงนนเราจงหนมาหา กระบวนการทางตวเลขทสามารถจะทาไดทเรยกวาเรยกวา
มอนตคารโล (Monte Carlo)
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
4
คาเฉลยกลางและความแปรปรวนคาเฉลยกลางและความแปรปรวนคาเฉลยกลางและความแปรปรวน คาเฉลยกลางและความแปรปรวน
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
M=M=50005000M=M=50005000 ใ • กาหนดใหคาจรง (True value) ของ A เทากบ 1
• จานวนของ N มคาแตกตางกนจานวนของ N มคาแตกตางกน
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
6
ฮสฮสโตแกรมโตแกรม (Histogram)(Histogram)ฮสฮสโตแกรม โตแกรม (Histogram) (Histogram)
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
7
คาประมาณจากวธมอนตคาประมาณจากวธมอนตคารโลคารโลคาประมาณจากวธมอนตคาประมาณจากวธมอนตคารโลคารโล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
การคานวณหาการคานวณหา 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
• ตวอยางท 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
โ ป ป • โดยคาพารามเตอร r นนเปนตวประกอบเลขชกาลงทตองการประมาณคาและคาทควรจะเปนสาหรบ r กคอ คาทมากกวา 0
• ตวประมาณคาควรจะเปนสงสด สาหรบ r น ก• ตวประมาณคาควรจะเปนสงสด สาหรบ r น กคอเปนการหาคาสงสด (Maximisation) ของฟ ปฟงกชนคาควรจะเปน (Likelihood function)
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
11
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
• สงเกตวาคาทนอยทสดของเทอม
( )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
ไ • สมการแบบไมเชงเสน (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
ฟงกชนเปาหมายฟงกชนเปาหมายฟงกชนเปาหมายฟงกชนเปาหมาย
( )1
2( ) ( )
NnJ
−
( )2( ) ( ) nJ r x n r= −0n=
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
15
• ตองการ( )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
ln ( ; )p θ∂ xln ( ; )0
pr
θ∂=
∂xr∂
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
17
การหาคาคาตอบแบบวนซา การหาคาคาตอบแบบวนซา (Iterative(Iterative Method)Method)
• กาหนด
ln ( ; )( )
pg
θθ
∂=
x( )g θ
θ=
∂
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
18
ฟงกชนเชงเสนฟงกชนเชงเสนฟงกชนเชงเสนฟงกชนเชงเสนป ป ฟ • การกระจายเปนแบบเกาส ความชนเปนฟงกชน
เชงเสน
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
19
ฟงกชนไมเปนเชงเสนฟงกชนไมเปนเชงเสนฟงกชนไมเปนเชงเสน ฟงกชนไมเปนเชงเสน • การกระจายแบบเรยลห (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
0 5b = ไ ป ฟ
0.5b =• การกระจายแบบเรยล ความชนไมเปนฟงกชน
เชงเสน
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
21
การประมาณคาความชนการประมาณคาความชนการประมาณคาความชนการประมาณคาความชน • อนกรมเทยเลอร (Taylor series) อนดบทหนง
( )d θ0 0
( )( ) ( ) ( )
dgg g
dθ
θ θ θ θθ
≈ + −0
0 0( ) ( ) ( )d θ θθ =
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
22
( )( ) ( ) ( )
dg θθ θ θ θ
0
1 0 1 0( )
( ) ( ) ( )g
g gd θ θ
θ θ θ θθ =
≈ + −0θ θ
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
23
ทจดตาสดทจดตาสด ( ) 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
( )θ01 0
( )g θθ θ= −1 0 ( )dgθ θ
θd θ θθ
0d θ θθ =
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
25
วธของวธของนวนวตนตน ราฟราฟสนสนวธของวธของนวนวตนตน--ราฟราฟสนสน
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
26
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
อนพนธอนดบทหนงอนพนธอนดบทหนงอนพนธอนดบทหนงอนพนธอนดบทหนง
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
อนพนธอนดบทสองอนพนธอนดบทสองอนพนธอนดบทสองอนพนธอนดบทสอง
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
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
การลเขาของคาการลเขาของคา rkrk ทคาเรมตนตางๆทคาเรมตนตางๆการลเขาของคา การลเขาของคา rkrk ทคาเรมตนตางๆทคาเรมตนตางๆ
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
31
การหาคาคาดหวงสงสดการหาคาคาดหวงสงสดExpectation Expectation MaximisationMaximisation
ป ป• เปนอกหนงกรรมวธการหาตวประมาณคาควรจะเปนสงสดแบบวนซา (Iterative) ( )
• EM นนเหมาะกบในบางสถานการณนนทตองการประมาณคาขอมลทขาดหายหรอไมตองการประมาณคาขอมลทขาดหายหรอไมสมบรณ (Incomplete data)
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
32
• x นนเรยกวา ขอมลทสมบรณ (Complete data)
• สวนขอมล y ทไดมาจากการสงเกตการณนนจะสวนขอมล y ทไดมาจากการสงเกตการณนนจะเรยกวา ขอมลทไมสมบรณ (Incomplete data)
( )T=y x( )Ty xAdvanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
33
• ตวอยางท 6.4 สมมตวาระบบรบสญญาณหนงมสายอากาศททาหนาทรบสญญาณอยหาตน ญญ
• ซงแตละตนมความสามารถของการรบสญญาณไมเทากน โดยจะสงเกตไดจากคา joint pdf ของไมเทากน โดยจะสงเกตไดจากคา joint pdf ของสญญาณทรบจากสายอากาศ
• โดยมคาคงท pi เปนตวแสดงความไมเทาเทยมกนของสายอากาศแตละตนกนของสายอากาศแตล ตน
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
34
สญญาณมครบสมบรณสญญาณมครบสมบรณสญญาณมครบสมบรณสญญาณมครบสมบรณ
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
35
ป • เราสามารถหาสมการคาควรจะเปนของการรบสญญาณรวมจากสายอากาศทงหาตนนไดจากญญการกระจายแบบมลตโนเมยล (Multinomial distribution) ซงอยในรปของ pdf แบบมdistribution) ซงอยในรปของ pdf แบบมเงอนไข (Conditional pdf)
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
36
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
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 ⎟⎝ ⎠
( ) 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
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
สญญาณไมครบสมบรณสญญาณไมครบสมบรณสญญาณไมครบสมบรณสญญาณไมครบสมบรณ
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
41
ไ • สญญาณทสงเกตการณไดสญญาณหนงเกดจากการรวมสญญาณจากสายอากาศมากกวาญญหนงตน นนกจะทาใหเราไมสามารถแยกออกไดวาสญญาณทรบมาจากแตละตนนนเปนอยางไรวาสญญาณทรบมาจากแตละตนนนเปนอยางไร
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
42
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
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
( ) ( )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
ทฤษฎของทฤษฎของเบยสเบยส((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
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
หาคาคาดหวงหาคาคาดหวงหาคาคาดหวงหาคาคาดหวง
{ } { } { }ˆ ˆ ˆ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
( ) ( )ˆ ˆl ( ) U Vθ θ θ θ θ′ ′ ′( ) ( )ln ( ; ) , ,p U Vθ θ θ θ θ′ ′ ′= −y
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
49
ป ป ˆ• หากคาประมาณ ณ ขณะนนเปนคาจรง ( ) ดงนนคาลอกของฟงกชนคาควรจะเปน (log-
θ θ=
( glikelihood) ใดๆ จะมคาสงสดเมอ ดวยθ θ′ =
ˆ ˆ ˆ( ) ( )V Vθ θ θ θ′ ≤( , ) ( , )V Vθ θ θ θ′ ≤
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
50
ป ′• ซงจะแปลวา หากยงมคาของ จนกระทงθ ′
ˆ ˆ ˆ( ) ( )U Uθ θ θ θ′ >( , ) ( , )U Uθ θ θ θ>
• จะไดวาคาลอกของคาควรจะเปน (log- ไ likelihood) นนกยงสงกวาไดอก
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
51
ˆ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
EM AlgorithmEM AlgorithmEM AlgorithmEM Algorithm
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
53
ใ • ลองใชขอมลเฉพาะชดหนงตวเลขเพอแสดงการใชอลกอรธม 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
24 62056+24 62056ˆ 0.5153
530mlπ+
= =530
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
55
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
( )( ) ( ) ( )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
4π
⎛ ⎞ ⎛ ⎞⎟ ⎟⎜ ⎜ ′+⎟ ⎟⎜ ⎜⎟ ⎟⎜ ⎜⎝ ⎠ ⎝ ⎠
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
57
( ) ( )00
( )
12ˆ{ ; } 175 1 1
i i
ix E x π =y
( )
( )
1 1ˆ
2 41
ˆ
i
i
π+
( )
( ) ( )11
( )
1ˆ
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
( )( 1) ( )ˆ ˆi iU+ ′( )( 1) ( )ˆ ˆargmax ,i iUπ
π π π+
′′=
π
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
59
( )i∂ ′ ( )ˆ, 0iU π π∂ ′ =′∂π′∂
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
60
( )( ) ( )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
( )( )
( )( 1) 1ˆ
29i
ii U
xπ ππ π+ ′∂
+′ ( )( )( ) 1,( )01 90
Uix
π π
ππ π+ ∂
=′∂
= =+
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
62
คาประมาณของคาประมาณของ 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
คาประมาณของคาประมาณของ πคาประมาณของคาประมาณของ π
p=0.515303
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
64
สรปสรปสรปสรป
ใ ใ• เราสามารถใชกระบวนการเชงตวเลขในการหาคาตอบ MLE เชน วธนวตน-ราฟสน ทใชกรณทฟงกชนเปาหมายมความไมเปนเชงเสนได
• EM ใชสาหรบการหาตวประมาณคาในกรณท• EM ใชสาหรบการหาตวประมาณคาในกรณทขอมลทตองการบางตวซอนอยในขอมลตวอนๆ
ไ หรอเรยกวาขอมลไมสมบรณ
Advanced Digital Signal Processinghttp://embedsigproc.wordpress.com
Asst. Prof. Dr. P.Yuvapoositanon
65