Docsity

Homework 2 for Pattern Recognition | EEL 6825, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
EEL6825: Homework 2
FALL 2003
Note: This homework is a mini-project and will take more time than a regular
homework. Your final project could build off of the base this homework creates.
Submit detailed and complete solutions, including well commented programming
code and runtime listings. See the homework submission guidelines.
The purpose of this homework is to do a real-world classification problem. To
classify complicated data, sophisticated models are required. Therefore, you are
asked to build a mixture of Gaussians model for the given data. These models
require the use of the EM algorithm to learn their parameters.
1. (100 points) On the homework website, you are given two sets of training im-
ages: {coke1.ppm, coke2.ppm, coke3.ppm}and {dietcoke1.ppm, dietcoke2.ppm,
dietcoke3.ppm}. The first set represents a regular coke can and the second set
represents a diet coke can. For the number of components, k, equal to 2, build
a k-mixture of Gaussians model in the RGB color space of each object using
the training images. Use the EM algorithm to learn the parameters of each
model. You may use Dr. Nechyba’s or any web available code, however, we
highly recommend you write your own. (From experience, it can be faster and
more educational to write your own code rather than figuring out what others
did.)
2. (50 points) Repeat part (1) for k={3,4,5}.
3. (100 points) On the homework website, you are given two test images: test1.ppm
and test2.ppm, which represent unknown objects. Your task is to classify each
image as either a “coke” or a “diet coke” object. To accomplish this, compare
posterior probabilities P(“coke00|x) and P(“diet coke00 |x) for each pixel and
by majority voting decide the identity of the object. Classify the test images
using each of the models from parts (1) and (2), that is, for each value of
k={2,3,4,5}.
4. (50 points) Knowing that the test image test1.ppm is a coke can and that
test2.ppm is a diet coke can, plot the percentage of erroneously classified pixels
from part (3) in each image for each value of k={2,3,4,5}. What is the best
model?
1

Partial preview of the text

Download Homework 2 for Pattern Recognition | EEL 6825 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EEL6825: Homework 2

FALL 2003

Note: This homework is a mini-project and will take more time than a regular homework. Your final project could build off of the base this homework creates. Submit detailed and complete solutions, including well commented programming code and runtime listings. See the homework submission guidelines. The purpose of this homework is to do a real-world classification problem. To classify complicated data, sophisticated models are required. Therefore, you are asked to build a mixture of Gaussians model for the given data. These models require the use of the EM algorithm to learn their parameters.

  1. (100 points) On the homework website, you are given two sets of training im- ages: {coke1.ppm, coke2.ppm, coke3.ppm} and {dietcoke1.ppm, dietcoke2.ppm, dietcoke3.ppm}. The first set represents a regular coke can and the second set represents a diet coke can. For the number of components, k, equal to 2, build a k-mixture of Gaussians model in the RGB color space of each object using the training images. Use the EM algorithm to learn the parameters of each model. You may use Dr. Nechyba’s or any web available code, however, we highly recommend you write your own. (From experience, it can be faster and more educational to write your own code rather than figuring out what others did.)
  2. (50 points) Repeat part (1) for k = { 3 , 4 , 5 }.
  3. (100 points) On the homework website, you are given two test images: test1.ppm and test2.ppm, which represent unknown objects. Your task is to classify each image as either a “coke” or a “diet coke” object. To accomplish this, compare posterior probabilities P (“coke′′|x) and P (“diet coke′′|x) for each pixel and by majority voting decide the identity of the object. Classify the test images using each of the models from parts (1) and (2), that is, for each value of k = { 2 , 3 , 4 , 5 }.
  4. (50 points) Knowing that the test image test1.ppm is a coke can and that test2.ppm is a diet coke can, plot the percentage of erroneously classified pixels from part (3) in each image for each value of k = { 2 , 3 , 4 , 5 }. What is the best model?