David Clausi
Dept. of Systems Design Engineering
University of Waterloo
Waterloo, Ontario
Canada N2L 3G1
dclausi 'at' engmail.uwaterloo.ca

Tel: (519) 888-4567 x2604
FAX: (519) 746-4791

SD372 - Pattern Recognition - Course Webpage


The 'FirstExperiment' file contains a matlab data file and *.m file.  Execute the *.m file with the name of the data file as the sole argument.  The 'kif' routines are found in the Gabor directly and will work with 3.0 of the PattnRec Toolbox.  Simply commenting out the 'cnormc' line in 'nmc.m' will allow the code to run to completion.
Prof. Clausi

April 4, 2003 @noon - a few additional tidbits based on recent questions from students.

Updated Friday, April 11 @~4pm (I don't expect to make any more major updates; complete solutions have now been provided as well as hopefully complete directions for the final exam)

Date: Thursday, April 17
Time: 9am-noon
Rooms:  E2-1303A (seating for last names starting with 'A' to 'J') and E2-1303B (seating for last names starting with 'K' to 'Z')
Crib Sheet - both sides of single 8.5"x11" paper (or equivalently, one side each of two 8.5"x11" papers!);  as for the midterm, only final equations and their titles allowed; no derivations, no solutions to problems, no text descriptions
Note: crib sheets must be submitted with your exam solutions; if you want to keep a copy, please photocopy prior to the exam
Bring a ruler
Aids not allowed:  NO calculators permitted (you really won't need one)
Material: all material Chs. 1 to 8 inclusive, all labs, all assigned problems

Recall the caveat introduced in the course outline on the first day of classes:  "If you pass the final exam, it will represent 50% of your course grade.  If you fail the final exam (<50%), then the final exam will represent 100% of the final grade."

Final Exam Office Hours:  
Given that the 3rd year SD class has exams on Monday and Tuesday, the only practical day to setup office hours is Wednesday.  
If you would like to meet with one of the instructors outside these office hours, you are welcome to make an appointment via email.
Prof. Clausi:  Wednesday 9-10am
Yanmin: Wednesday noon-1pm
Ossama: Wednesday 2-3pm
(Note: the above substitute for the office hours that were used during the term)

The final exam will test both your understanding of the theory and your ability to solve quantitative problems.  For example, a question with a theoretical basis might ask you to compare the similarities/differences with respect to the Perceptron and MSE algorithms and a quantitative problem might involve applying one or the other technique (or both!) to a given set of data.  The midterm exam was all quantitative, but I also want to evaluate your understanding of the theory on the final exam.  Most of the exam will be quantitative, but I wanted to make sure you were prepared for theory-based questions.  My recommendations are that you (a) develop a strong understanding of the concepts in the class, course notes, and labs and (b) learn the methdology necessary to complete the assigned problems.

Date: Wednesday, February 12
Time: 1:30 - 3:30pm
Aids:  crib sheet (only final equations and their titles allowed; no derivations, no solutions to problems, no text descriptions); bring a ruler
Note: crib sheets will be submitted with your exam solutions; these will be returned to you
Aids not allowed:  NO calculators permitted (you really won't need one)
Material: all material Chs. 1 to 4 inclusive

Office Hours in Preparation for the Midterm
Monday:  Prof. Clausi, 2:30-3:30pm (DC-2611)
Monday:  Ossama, 6:00-7:00pm, (in the classroom)
Tuesday: Ossama, 12:30-1:30pm (DC-2630)
Tuesday: Yanmin, 2:30-3:30pm (DC-2622) (Yanmin will not have an office hour on Thursday)

Midterm Summary Solutions


On this webpage, I will be providing a host of  material for this course.  Note that some of the material will be added as the course progresses.

Course Outline

TA Contact Information and Office Hours:

Tutorial Schedule (will be posted on a week by week basis):

Suggested Homework Problems (will be posted on a chapter by chapter basis):

Solutions to Homework Problems (will be posted on a chapter by chapter basis):

Note that these solutions include the final answers and some hints.  Solutions to all problems found in the course notes have been provided, but please note the "Suggested Homework Problems" indicated above.

Chapter 2 Solutions
 Chapter 3 Solutions
Chapter 4 Solutions
Chapter 5 Solutions
Chapter 6 Solutions
Chapter 7 Solutions
Chapter 8 Solutions

Previous Exams

2002 Midterm:  Questions Page 1    Questions Page 2    Solutions
2001 Final Exam

Reference Material

If students would like some alternate references for course material and for additional problems to work on, I would suggest two books:

Duda, Hart & Stork (Q327.D83, On Reserve in DC Library)  Pattern Classification and Scene Analysis
(There are two editions; the second is quite new, and is an excellent book.  Any student seriously interested in pattern recognition could consider purchasing this book.)

Schalkoff (Q327.S27, On Reserve in DC Library) Pattern Recognition : Statistical, Structural, and Neural Approaches
(An excellent book; not as comprehensive as Duda & Hart, but more readable.)

SD372 Course Notes
Duda, Hart, & Stork
Ch. 1
Ch. 1
Statistics Background
Ch. 2
App. 1,2
App. A
Distance Classification
Ch. 3

Statistical Classification
Ch. 4
Ch. 2
Ch. 2
Parameter Estimation
Ch. 5.1
Ch. 3 (p. 58-70)
Ch. 3
NonParametric Estimation
Ch. 5.2
Ch. 3 (p. 70-82)
Ch. 4
Linear Discriminants
Ch. 6
Ch. 4
Ch. 5
Unlabeled Clustering
Ch. 7
Ch. 5
Ch. 6
Feature Selection
Ch. 8

Ch. 1.3

Lab Material

Ossama has put together a Matlab summary for your use.  He will speak to this during the tutorial on January 22.

 *** Lab 1 ***

Here's the pdf for Lab#1.

An ellipse drawing program is available for you here.  This will come in handy for the first lab.

*** Lab 2 ***

Here's the pdf for Lab#2.

Section 2 requires the following dataset. This section involves generating 1-d pdf estimates.

Section 3 requires the following dataset.  Section 3 is an extension of Section 2 - here, 2-d pdf estimates are determined.  It's not that much harder!

Prior to starting Section 3, take a look at how the data is dispersed in this image.

A means of generating the 2-D Parzen routine is provided for you.  Use this matlab script.

Hints for Lab 2 from Ossama:

Hi Prof Clausi,
Here are the lab 2 tips:

* If you will use the parzen2.m function:

Whenever you call parzen2.m, specify the range for the second parameter to parzen2.m, and don't just pass it the resolution. I.e., always pass a vector as the second parameter to parzen2.m, and not a scalar.

Let's all use a [0 0 500 500] range (if you will use parzen2.m).

For example, if your resolution is x, always pass [x 0 0 500 500] as the second parameter to parzen2.m

* The Matlab interp2.m might be useful (will provide just an alternate solution, it won't simplify coding, and you don't have to use it).

* Note that Matlab can do the following:

if A, B, and C are three matrices as follows:

A =
     1     2     3
     4     5     6
     7     8     9

B =
     0     0     0
     7     8     9
     0     0     0

C =

     0     0     0
     0     0     0
    10    11    12

>> D = A > B & A > C

D =

     1     1     1
     0     0     0
     0     0     0

* The error computation should be done in code


*** Lab 3 ***

Officially, this lab is due April 1.  However, we will accept late submissions without penalty up to and including April 4.  Labs submitted after this date will not be accepted.

Here's the pdf for Lab #3.

The zip file with the images and M-files required for Lab #3 is here.

Here are the images we will be using, but please use the version in the zip file above - these are just setup so you can look at them all at the same time ...

Cloth Cotton Grass Pigskin Wood
Cork Paper Stone Raiffa Face