CSE 417T: Homework 4


Category: You will Instantly receive a download link for .zip solution file upon Payment


5/5 - (4 votes)


1. (50 points) For this problem, you will be doing LFD Problem 4.4 parts (a) through (d) with
some changes / help / instructions / requirements. First, you can find headers for all the
code you need to implement in your SVN repository for the class. There is also a matlab
script called run expts.m which you can use as an example for how to run your code to
return the results we want. Second, read Problem 4.3 carefully. You can (and will need to)
use the recurrence defined there as well as the formula in 4.3(e).

(a) In addition to answering the question about why we need to normalize f, also prove
that the term to normalize by is qPQ
2q+1 (hint: use the formula in 4.3(e)).

(b) Answer the question. For your implementation, we suggest you use glmfit with the
additional options ’normal’,’constant’,’off’.

(c) Answer the question (hint: use the formula in 4.3(e)).

(d) Implement the framework and answer the questions, with the modification that you
only need to look at Qf ∈ {5, 10, 15, 20}, N ∈ {40, 80, 120}, σ2 ∈ {0, 0.5, 1.0, 1.5, 2.0}.

Compute both the median and the mean of the overfit measure applied to many (at
least 500) different datasets for each choice of parameters, and report how these measures vary as a function of the complexity of the true hypothesis, the number of training
examples, and the level of stochastic noise (use line graphs). Explain your observations,
and also comment on the differences you observe between the mean and median measures.

Here are some potentially useful notes and hints for this:

• You will be graded on your writeup. Correctness of the code in itself does not count
for credit, but we may look at and examine your code manually if needed.

• You should use your judgment in selecting which graphs to show in support of your
answers and explanations. There are different acceptable ways to do this. For example, you could include 3-6 graphs, selected to show what you think is most interesting/relevant. For each one, you could hold one variable constant, and plot different
lines for a second variable, while putting the third one on the X axis. Alternatively you
could explore heatmaps/colormaps/colorbars.

• Do not use the Matlab built-in functions related to Legendre polynomials – those compute something different from what we are looking for.

• You may use or modify run expts.m as you see fit. It’s meant to provide an example
of how you could do things, not to be the last word on the issue.