




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Homework solution reference for EE646
Typology: Assignments
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Homework 1 Solutions
%P1.
x=-10:0.01:10;
y1=gauss(0,1,x');
y2=gauss(2,4,x');
plot(x,y1,x,y2);
print -djpeg hw1_1_1.jpg
y1_5=gauss(0,1,5)
y1_5 =
1.4867e-
y2_5=gauss(2,4,5)
y2_5 =
( , ) ~ ( ) exp
P1.1 Likelihood
( | ) exp
( | ) exp
x
N p x
p x x
x
p x
P1.2 Prior
Evidence
p x p x P p x P
%P1.
e=0.6y1+0.4y2;
plot(x,e)
print -djpeg hw1_1_2.jpg
e_5=0.6gauss(0,1,5)+0.4gauss(2,4,5)
e_5 =
P1.3 Posterior
P x p x P p x
P x p x P p x
%P1.
l=y1./y2;
plot(x,l)
print -djpeg hw1_1_4.jpg
l_5=gauss(0,1,5)/gauss(2,4,5)
l_5 =
2.2958e-
12 2 2
P1.6 Likelihood ratio threshold
For defined los
s fun
ti n
c o
1 12 22 2
2 21 11 1
11 1 1 12 1 2
21 2 1 22 2 2
1
For general loss function, decide if:
P1.5 Likelihood r
atio threshold
For zero-one loss
f
p x P
p x P
a a
a a
2
1
unction
%P1.
th=4/3;
c1=(l>=th);
c2=(l<th);
plot(x,c1,x,c2)
print -djpeg hw1_1_6.jpg
1 1 1 11 1 12 2 2
2 2 2 21 1 22 2 1
1 2
In region : ( | ) ( | ) ( | ) ( | )
In region : ( | ) ( | ) ( | ) ( | )
The over all risk is
P1.7 Bayes
risk
R x P x P x P x
R x P x P x P x
R R x p x dx R x p x dx
1 1
1 2 1 2
1
1 2
1
( )
t -
2 1 1 2 2 1
1 2
1 2
if ( | ) are normal
( | ) ( | ) , where
+ ln
In Bh
attac
i
k
P error P P p x p x dx
p x
p x p x dx e
k
1
1 2
1 2
0
t -1 1 2
2 1 1 2 2 1
1 2
( / )
haryya bound, /
( / ) / ( - ) [( + )/2] ( - )+ ln
*. [ , ] ln
k
k
P error P P e
e
6779
.