Answer Key for Practice Exam 1 - Statistical Pattern Recognition | CS 591Q, Exams of Computer Science

Material Type: Exam; Professor: Ross; Class: ADTP:Statistcl Pattrn Recogntn; Subject: Computer Science; University: West Virginia University; Term: Spring 2009;

Typology: Exams

Pre 2010

Uploaded on 07/30/2009

koofers-user-z8e-1
koofers-user-z8e-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Answer Key for Practice Exam 1
CS 591Q/791V - Pattern Recognition
Posted on: March 21, 2009
1. (a) Bootstrapping: A technique to estimate the variance in the error rate of a pattern classifier. In this
method, the test dataset consisting of, say, Ndata points, D={x1, x2, . . . xn}, is sampled multiple times.
Each sample set, DS, is obtained by drawing Npoints at random from D,with replacement, so that some
points in Dmay be replicated in DS, whereas other points in Dmay be absent from DS. This process is
repeated Ltimes to generate Lsample sets each of size N. The performance of the classifier is then evaluated
on each of these Lsample sets thereby allowing one to estimate the variance in error between the different
bootstrap data sets. [See pg. 23].
(b) Parzen Window: The kernel function used to estimate the value of the density function at a particular
point in the feature space by using the evidence of all the training pointpoints is called a Parzen window. If
φis a kernel function such that φ(u)0 and Rφ(u)du= 1, then the density at xcan be estimated as,
ˆp(x) = 1
N
N
X
i=1
1
hDφxxi
h,
where, {x1,x2,...xN}are the training points, Dis the dimensionality of each xiand his the width of the
Parzen window. [See pg. 123].
(c) Fisher’s linear discriminant: Fisher’s linear discriminant is a classification method that projects high-
dimensional data (x) onto a line and performs classification in this one-dimensional space (y). The projection
maximizes the distance between the means of the classes while minimizing the variance within each class.
The projection vector, w, is obtained by maximizing the Fisher’s criterion. [See pp. 186-189].
2. The estimated density at xcan be computed as,
ˆp(x) = 1
N
N
X
i=1
1
hφxxi
h,(1)
where, the xis are the points sampled from the unknown density p(x), N= 13, h= 1, and φis the kernel
function.
The uniform kernel function takes the following form [pg. 123]:
φ(u) = (1,|u| 1/2,
0,otherwise.(2)
Now, φxxi
h=φ(xxi), i= 1,2,...13, since h= 1. Thus,
φ(xxi) = 1,if |xxi| 1/2 based on equation (2).(3)
Therefore, the sum
13
X
i=1
φ(xxi),
1
pf3

Partial preview of the text

Download Answer Key for Practice Exam 1 - Statistical Pattern Recognition | CS 591Q and more Exams Computer Science in PDF only on Docsity!

Answer Key for Practice Exam 1

CS 591Q/791V - Pattern Recognition

Posted on: March 21, 2009

  1. (a) Bootstrapping: A technique to estimate the variance in the error rate of a pattern classifier. In this method, the test dataset consisting of, say, N data points, D = {x 1 , x 2 ,... xn}, is sampled multiple times. Each sample set, DS , is obtained by drawing N points at random from D, with replacement, so that some points in D may be replicated in DS , whereas other points in D may be absent from DS. This process is repeated L times to generate L sample sets each of size N. The performance of the classifier is then evaluated on each of these L sample sets thereby allowing one to estimate the variance in error between the different bootstrap data sets. [See pg. 23]. (b) Parzen Window: The kernel function used to estimate the value of the density function at a particular point in the feature space by using the evidence of all the training pointpoints is called a Parzen window. If φ is a kernel function such that φ(u) ≥ 0 and

φ(u)du = 1, then the density at x can be estimated as,

ˆp(x) =

N

∑^ N

i=

hD^

φ

x − xi h

where, {x 1 , x 2 ,... xN } are the training points, D is the dimensionality of each xi and h is the width of the Parzen window. [See pg. 123]. (c) Fisher’s linear discriminant: Fisher’s linear discriminant is a classification method that projects high- dimensional data (x) onto a line and performs classification in this one-dimensional space (y). The projection maximizes the distance between the means of the classes while minimizing the variance within each class. The projection vector, w, is obtained by maximizing the Fisher’s criterion. [See pp. 186-189].

  1. The estimated density at x can be computed as,

pˆ(x) =

N

∑^ N

i=

h

φ

x − xi h

where, the xis are the points sampled from the unknown density p(x), N = 13, h = 1, and φ is the kernel function. The uniform kernel function takes the following form [pg. 123]:

φ(u) =

1 , |u| ≤ 1 / 2 , 0 , otherwise.

Now, φ

( (^) x−xi h

= φ(x − xi), i = 1, 2 ,... 13, since h = 1. Thus,

φ(x − xi) = 1, if |x − xi| ≤ 1 /2 based on equation (2). (3)

Therefore, the sum ∑^13

i=

φ(x − xi),

denotes the number of xis that are at a distance ≤ 1 /2 from x. So,

pˆ(0) =

× 0 = 0,

p ˆ(1) =

× 2 = 0. 15 ,

p ˆ(3) =

× 3 = 0. 23 ,

p ˆ(5) =

× 1 = 0. 07 ,

p ˆ(7) =

× 3 = 0. 23 ,

p ˆ(9) =

× 0 = 0.

  1. The required likelihood function can be written as,

p [(x = 0. 6 , C 1 ), (x = 0. 1 , C 3 ), (x = 0. 9 , C 3 ), (x = 1. 1 , C 2 )] = p(x = 0.6)P (C 1 |x = 0.6).p(x = 0.1)P (C 3 |x = 0.1).p(x = 0.9)P (C 3 |x = 0.9).p(x = 1.1)P (C 2 |x = 1.1) (4)

Note that by Bayes formula, p(x)P (Ci|x) = p(x|Ci)P (Ci). Then, equation (4) may be written as,

p(x = 0. 6 |C 1 )P (C 1 ) × p(x = 0. 1 |C 3 )P (C 3 ) × p(x = 0. 9 |C 3 )P (C 3 ) × p(x = 1. 1 |C 2 )P (C 2 ) = (0. 33 × 0 .5) × (0. 26 × 0 .25) × (0. 39 × 0 .25) × (0. 33 × 0 .25) (By evaluating the class-conditional densities at particular values of x) = 8. 62 × 10 −^5 .

  1. (a) Based on the data:

μˆ 1 = 0.096, σˆ^21 = 0.657, ˆμ 2 = 0.812, σˆ^22 = 1.964. Thus,

p(x|C 1 ) ∼ N (0. 096 , 0 .657),

p(x|C 2 ) ∼ N (0. 812 , 1 .964).

(b) The Bayes decision rule is: Assign x to C 1 if P (C 1 |x) > P (C 2 |x); else assign x to C 2. If P (C 1 |x) > P (C 2 |x), then

p(x|C 1 ).p(C 1 ) p(x)

p(x|C 2 ).p(C 2 ) p(x)

(By Bayes formula)

⇒ p(x|C 1 ) > p(x|C 2 ) (Since p(C 1 ) = p(C 2 ))

2 πσ^21

exp

[

(x − μ 1 )^2 2 σ^21

]

2 πσ^22

exp

[

(x − μ 2 )^2 2 σ^22

]

(Applying ln on both sides and multiplying both sides by (−2))

⇒ ln(σ^21 ) +

(x − μ 1 )^2 σ 12

< ln(σ^22 ) +

(x − μ 2 )^2 σ 22

⇒ ln(0.657) +

(x − 0 .096)^2

  1. 657

< ln(1.964) +

(x − 0 .812)^2

  1. 964