Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Homework 1 Solutions: Probability and Decision Theory, Assignments of Pattern Classification and Recognition

Homework solution reference for EE646

Typology: Assignments

2019/2020

Uploaded on 10/15/2020

little_cute
little_cute 🇺🇸

5

(1)

5 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework 1 Solutions
%P1.1
>> 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-006
>> y2_5=gauss(2,4,5)
y2_5 =
0.0648
2
1 1
2
2
2
1 1 2
12
2
2
1 1 2
22 2
2 2
( , ) ~ ( ) exp
P1.1 Likelihood
( | ) exp
( | ) exp
x
N p x
p x x
x
p x
0 6 0 4
1 2
1 1 2 2
P1.2 Prior
( ) . , ( ) .
Evidence
( ) ( | ) ( ) ( | ) ( )
P P
p x p x P p x P
pf3
pf4
pf5
pf8

Partial preview of the text

Download Homework 1 Solutions: Probability and Decision Theory and more Assignments Pattern Classification and Recognition in PDF only on Docsity!

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 P

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

P P

P P

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

P

P

%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

( ) ( - ) [ +(1- ) ] ( - )

+ ln

In Bh

P2.2.

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

.