Pattern Recognition Problem Set 2: Bayesian Decision Making and Error Analysis - Prof. Mic, Assignments of Computer Science

Problem set 2 for cs 4803a/8803a: pattern recognition course. It includes instructions and data for various problems related to bayesian decision making, error analysis, and hypothesis testing. Students are required to use matlab for data visualization and calculation.

Typology: Assignments

Pre 2010

Uploaded on 08/05/2009

koofers-user-0xu-1
koofers-user-0xu-1 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 4803A/8803A: Pattern Recognition
Problem Set 2
Date: Jan 28, 2003 Due: start of class Feb 11, 2001
WARNING: Do not leave this for the last night before the PS is due. It takes some work.... And
I will be out of town as of Feb 9.
1. In a particular binary hypothesis testing application, the conditional density for a scalar feature
given class
½
is
½

½

½

¾

Given class
¾
, the conditional density is
¾

¾

¾



¾

(a) Find
½
and
¾
, and plot the two densities on a single graph using Matlab.
(b) Assume that the prior probabilities of the two classes are equal, and that the cost for
choosing correctly is zero. If the costs for choosing incorrectly are
½¾

and
¾½

,
what is the expression for the Bayes risk?
(c) Find the decision regions which minimize the Bayes risk, and indicate them on the plot
you made in part (a).
(d) For the decision regions you found in part (c), what is the numerical value of the Bayes
risk? Hint: use Matlab’s erf function but be careful - the erf function is a bit weird.
Check help.
2. Hans and Frans each want to classify patterns into two classes
½
and
¾
, whose prior proba-
bilities are equal. They both measure quantity
, but with different measuring devices.
(a) Hans uses the latest model of the device, which we can call feature
½
, to do the classifi-
cation. The probability distribution of
½
for each class is:
½

½

½

½
½
0.80 0.055 0.145
½
¾
0.15 0.05 0.80
Hans wants to use the decision rule which minimizes his error rate. What is the rule, and
what is its error rate?
1
pf3
pf4

Partial preview of the text

Download Pattern Recognition Problem Set 2: Bayesian Decision Making and Error Analysis - Prof. Mic and more Assignments Computer Science in PDF only on Docsity!

CS 4803A/8803A: Pattern Recognition

Problem Set 2 Date: Jan 28, 2003 Due: start of class Feb 11, 2001

WARNING: Do not leave this for the last night before the PS is due. It takes some work.... And I will be out of town as of Feb 9.

  1. In a particular binary hypothesis testing application, the conditional density for a scalar feature given class  (^) is

          ^ 

Given class  (^)  , the conditional density is

           ^ 

(a) Find  and  (^)  , and plot the two densities on a single graph using Matlab. (b) Assume that the prior probabilities of the two classes are equal, and that the cost for choosing correctly is zero. If the costs for choosing incorrectly are  (^)   and  (^)   , what is the expression for the Bayes risk? (c) Find the decision regions which minimize the Bayes risk, and indicate them on the plot you made in part (a). (d) For the decision regions you found in part (c), what is the numerical value of the Bayes risk? Hint: use Matlab’s erf function but be careful - the erf function is a bit weird. Check help.

  1. Hans and Frans each want to classify patterns into two classes  (^) and  (^)  , whose prior proba- bilities are equal. They both measure quantity , but with different measuring devices.

(a) Hans uses the latest model of the device, which we can call feature  (^) , to do the classifi- cation. The probability distribution of  (^) for each class is:           0.80 0.055 0.    0.15 0.05 0. Hans wants to use the decision rule which minimizes his error rate. What is the rule, and what is its error rate?

(b) Frans uses an older model of the device, which we can call feature  (^)  , to do the classifi- cation. The probability distribution of  (^)  for each class is:           0.26 0.73 0.    0.026 0.803 0. Frans also wants minimize his error rate. What rule should he use, and what is its error rate? (c) What is Hans’s confidence in his classification (how certain is he that he made the right choice), as a function of his measurement ? That is, for each possible value of  (^) and the decision rule you stated above, how certain is Hans that he’s making the right choice? What is Frans’s confidence in his classification, as a function of his measurement  (^) ? (d) What does this tell you about the relationship between a classifier’s error rate and our confidence in its classification? Does Hans or does Frans have a better classifier? Why?

  1. You are designing software for an airport radar system. The airport runway constantly emits a radar signal which is reflected when an aircraft is landing. The radar return is a time series of discrete measurements  . If there is no aircraft, the return is zero. If there is an aircraft, the return is a deterministic signal  of length. Furthermore, the return always has noise added to it which we can model as zero-mean Gaussian with variance ^. You can assume that the noise at different times is independent. To detect aircraft, you will inspect every window of length to see if it contains the character- istic signal . Each window can be considered a fixed-length vector . Show that an optimal decision rule, regardless of the priors and costs, has the form ^   for some vector  and threshold . Give one possible .
  2. You are given two datasets (find them by clicking on “datasets” on the course home page). Each dataset contains 100 examples of a 3D random vector. Your task is to discriminate between these two datasets. To do that, you will do the following in Matlab:

 Calculate the sample covariance matrices of the datasets. If we assume that the classes have the same covariance, then the best estimate of the common covariance is the average of the two sample covariance matrices.  Compute the eigenvectors of your estimate of the common covariance matrix.  And then answer the following questions:

- Which eigenvectors capture most of the energy in the data? - Which eigenvectors permit you to discriminate most easily?

Discuss your results. Do you find that the eigenvectors that capture most of the energy in the data (also known as the Most Expressive Feature [MEF]) also are the Most Discriminating Feature? If so, why? If not, why not?

  1. Billy’s Beetle Repainting of LA is a shop specializing in repainting VW Beetle automobiles. When the car is white (about 30% of the cars), they must do a quick measurement on the paint to determine if it’s original, and quote a total price depending on the measurement. They’ve

when there is no mistake. Wilbur makes his decision whether or not to speak up based on the murmuring level . Let  (^)  be the probability that Wilbur speaks up correctly, i.e., when there is a mistake on the board, and let  (^)  be the probability that he speaks up when there is no mistake on the board. Design a decision rule so that  (^)  is maximized subject to the constraint that  (^)    . What is the resulting value of  (^) ?

  1. This problem addresses the issue of making decisions when the class distributions are them- selves uncertain. Perhaps surprisingly, this situation can be handled without any extra machin- ery beyond what you have been given so far. The problem: You want to determine if a fish taken from a given pond is a carp or bass, based on its weight in pounds. You consult two experts on fish who agree on some things and disagree on others. They both agree that:

 Carp and bass are equally likely to be drawn from the pond.  The weight of either type of fish is Gaussian-distributed with a standard deviation of one pound.  The mean weight of a carp is 3 pounds.

However, one expert says that the mean weight of a bass is 2 pounds, while the other expert says the mean weight of a bass is 4 pounds. You trust both experts equally well, and you believe one of them is right. There is an optimal Bayesian decision rule based on this information alone. What is the rule?