CS485/685 - Assignments
There will be four assignments given the course, each worth 12.5%
of
the
final mark (7.5% for CS685). Each assignment will have a
theoretical
part
and
a programming part. Assignments are done individually (i.e.,
no
team). You are free to program in the language of
your choice, however Matlab is recommended since it provides a
convenient high-level programming environment for matrix
operations. If you decide to program in
Matlab, the IST group maintains a nice set of online references for Matlab
including a
tutorial.
The approximate out and
due
dates
are:
- A1: out Jan
10, due Jan 26 out Jan 17, due Feb 2
- A2: out Jan
26, due Feb 14 out Feb 2, due Feb 28
- A3: out Feb
14, due March 6 out March 1, due March 15
- A4: out
March 6, due March 22 out March 14, due March 29
On the due
date
of an assignment, the work done to date should be submitted at the
beginning of class; further material may be submitted for half
credit
within 24 hours. Assignments submitted more than 24 hours
late
will
not be marked.
NB: Unclaimed assignments can be picked up at Jessica
Miranda's
office (DC3516) between 8:30-12 and 1-4:30pm.
Assignment 1: due Feb 2
- Assignment
handout
- Datasets: data.zip
- Problem: this data is a modified version of the Optical
Recognition
of
Handwritten
Digits
Dataset from the UCI
repository. It contains preprocessed black and white
images of
the digits 5 and 6. Each attribute indicates how many
pixels are
black in a patch of 4 x 4 pixels.
- Format: there is one row per image and one column per
attribute. The class labels are 5 and 6.
- Parsing: if you use Matlab, you can load the datasets easily
with the command "load dataX.csv".
- Ricardo Salmon (rsalmon [at] cs
[dot]
uwaterloo [dot] ca) is the TA in charge of Assignment 1.
He will
hold special office hours on
Jan 30,
11 am - 1 pm in the AI lab (DC2306C).
Assignment 2: due Feb 16 Feb 28
- Assignment
handout
- Corrected dataset: dataset.zip
(Feb
13) make
sure to download this corrected dataset
- Problem: this data corresponds to samples from a 2D surface
that you can plot to visualize what the algorithms are
doing. The
data is divided in two sets, one for training and one for
testing. Unlike assignment 1, is it is not necessary to
use cross
validation. For this assignment sinply train with the
training
data and report the accuracy with respect to the test data.
- Format: there is one row per data instance and one column
per
attribute. The labels are real values.
- Parsing: if you use Matlab, you can load the datasets easily
with the command "load filename.csv".
- Visualization: here is a 3D view of
the
data. To generate this surface, type the following
command in
matlab "for i=1:128,
f(fDataTrain(i,1),fDataTrain(i,2))=fLabelsTrain(i);
f(fDataTest(i,1),fDataTest(i,2))=fLabelsTest(i); end,
mesh(f);" and
rotate the axes appropriately.
- What to hand in:
- print out of your code
- regularlized generalized linear regression:
- graph that shows the mean squared error as a function of
the
regularization weigtht lambda (0 to 4 in increments of 0.1)
and the
degree of the polynomial basis functions (degree 1, 2, 3 and
4).
- discussion of the results and how the running time varies
with the degree.
- Bayesian generalized linear regression (assume output noise
is
Gaussian with variance = 1):
- graph that shows the mean squared error as a function of
the
prior parameter lambda (0 to 4 in increments of 0.1) and the
degree of
the polynomial basis functions (degree 1, 2, 3 and 4).
Use a
Gaussian prior: Pr(w) = k*exp(-0.5*lambda*wTw).
- discussion of the results and how they compare with
regularized generalized linear regression
- Gaussian process regression (assume output noise is Gaussian
with variance = 1):
- polynomial kernel: graph that shows mean squared error as
a
function of the degree (1 to 5 in increments of 1)
- Gaussian kernel: graph that shows mean squared error as a
function of the sigma parameter of the gaussian kernel (1 to
6 in
increments of 1)
- identity kernel: mean squared error
- discussion of the results and how the running time varies
- Neural network regression (use a step length of 0.0001 and
perform 10,000 rounds of training where each round consists of
sequential gradient descent with respect to each training
point)
- graph that shows mean squared error as a function of the
number of hidden units (1 to 6 in increments of 1)
- discussion of the results
- Ricardo Salmon (rsalmon [at] cs
[dot]
uwaterloo [dot] ca) is the TA in charge of Assignment 2.
He will
hold special office hours on
Feb 13,
11 am - 1 pm in the AI lab (DC2306C).
Assignment 3: due March 15
- Assignment
handout
- Dataset: data.zip
- Problem: this dataset consists of sequences of hidden states
and noisy observations.
- Format: each the data file consists of a sequence of noisy
observations with one data instance per row. Each label
file
consists of a sequence of hidden states (labeled 1, 2 or 3).
- Parsing: if you use Matlab, you can load the dataset easily
with the command "load filename.csv".
- Ruth Urner
(rurner [at] cs [dot] uwaterloo [dot] ca) is the TA in charge of
Assignment 3. She will
hold special office hours on
March
12, 2-4 pm in the AI lab (DC2306C).
Assignment 4: due March 29
- Assignment
handout
- Ruth Urner
(rurner [at] cs [dot] uwaterloo [dot] ca) is the TA in charge of
Assignment 4. She will hold special
office
hours on March 26, 1-3 pm in the AI lab (DC2306C).