(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
=Homework 2, [[2014_Summer_pattern_recognition_Bochum_Boutin|Statistical Pattern Recognition, Summer 2014 (Bochum)]]= | =Homework 2, [[2014_Summer_pattern_recognition_Bochum_Boutin|Statistical Pattern Recognition, Summer 2014 (Bochum)]]= | ||
− | a) Suppose that | + | a) Suppose that two classes have the following densities: |
<math>\rho(x|\omega_1) = \frac{1}{2\pi} e^{-\frac{x^2}{2}},</math> | <math>\rho(x|\omega_1) = \frac{1}{2\pi} e^{-\frac{x^2}{2}},</math> | ||
Line 10: | Line 10: | ||
<math>\rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-10)^2}{2}},</math> | <math>\rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-10)^2}{2}},</math> | ||
− | <math>Prob(\omega_1)=Prob(\omega_2)=0.5.</math> | + | and that the two classes have equal priors: |
+ | |||
+ | <math>Prob(\omega_1)=Prob(\omega_2)=0.5. \ </math> | ||
For <math>N=5,10,15,\ldots, 1000</math>, generate N points from the mixture density | For <math>N=5,10,15,\ldots, 1000</math>, generate N points from the mixture density | ||
− | <math>\rho(x) = 0.5 \rho(x|\omega_1)+0.5 \rho(x|\omega_2),</math> | + | <math>\rho(x) = 0.5 \rho(x|\omega_1)+0.5 \rho(x|\omega_2), \ </math> |
keeping track of the true class each point was drawn from (the ground truth-- the label of each data point). Then use Baye's decision rule (assuming perfect knowledge of the parameters of the class density) to classify the points and record the (empirical) percentage of error. Repeat this experience 100 times for each N, and plot your results (percentage of error versus N) on a graph. Also plot the average of the error, over all 100 trials, for each N. Plot the standard derivation of the error, over all 100 trials, for each N, as well. How do the errors you obtained compare with Bayes' error? Discuss your results. | keeping track of the true class each point was drawn from (the ground truth-- the label of each data point). Then use Baye's decision rule (assuming perfect knowledge of the parameters of the class density) to classify the points and record the (empirical) percentage of error. Repeat this experience 100 times for each N, and plot your results (percentage of error versus N) on a graph. Also plot the average of the error, over all 100 trials, for each N. Plot the standard derivation of the error, over all 100 trials, for each N, as well. How do the errors you obtained compare with Bayes' error? Discuss your results. | ||
− | b) Repeat a) using the following class 2 density | + | b) Repeat a) using the following class 2 density instead |
<math>\rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-1)^2}{2}},</math>. | <math>\rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-1)^2}{2}},</math>. | ||
Line 24: | Line 26: | ||
Discuss your results. | Discuss your results. | ||
− | c) Repeat a) using the following class 2 density | + | c) Repeat a) using the following class 2 density instead |
<math>\rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-10)^2}{20}},</math>. | <math>\rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-10)^2}{20}},</math>. |
Latest revision as of 02:16, 8 July 2014
Homework 2, Statistical Pattern Recognition, Summer 2014 (Bochum)
a) Suppose that two classes have the following densities:
$ \rho(x|\omega_1) = \frac{1}{2\pi} e^{-\frac{x^2}{2}}, $
$ \rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-10)^2}{2}}, $
and that the two classes have equal priors:
$ Prob(\omega_1)=Prob(\omega_2)=0.5. \ $
For $ N=5,10,15,\ldots, 1000 $, generate N points from the mixture density
$ \rho(x) = 0.5 \rho(x|\omega_1)+0.5 \rho(x|\omega_2), \ $
keeping track of the true class each point was drawn from (the ground truth-- the label of each data point). Then use Baye's decision rule (assuming perfect knowledge of the parameters of the class density) to classify the points and record the (empirical) percentage of error. Repeat this experience 100 times for each N, and plot your results (percentage of error versus N) on a graph. Also plot the average of the error, over all 100 trials, for each N. Plot the standard derivation of the error, over all 100 trials, for each N, as well. How do the errors you obtained compare with Bayes' error? Discuss your results.
b) Repeat a) using the following class 2 density instead
$ \rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-1)^2}{2}}, $.
Discuss your results.
c) Repeat a) using the following class 2 density instead
$ \rho(x|\omega_2) = \frac{1}{2\pi} e^{-\frac{(x-10)^2}{20}}, $.
Discuss your results.