Lab 1 - BINARY CLASSIFICATION AND MODEL SELECTION

This lab addresses binary classification and model selection on synthetic data.
The aim of the lab is to play with the libraries and to get a practical grasp of what we have discussed in class. Follow the instructions below.
Think hard before you call the instructors!

At the end of your work send an email to the instructors answering the questions raised below in part II.

Download file spectral_filters.zip.

Part I - warm up

Run the file gui_filter.m and a GUI will start. Have a look to the various components.

Back on the matlab shell, have a look to the content of directory "spectral_reg_toolbox". There you will find, among the others, the code for command "learn" (used for training), "pattrec" (used for testing), "kcv" (used for model selection on the training set)

Finally, you may want to have a look at the content of directory "dataset_scripts" and in particular to file "create_dataset" that
will allow you to generate data synthetic data of different types.

Part II - analysis

Carry on the following experiments either using the GUI, when it is possible, or writing appropriate scripts.

(1) Generate data of "Linear" type. Considering linear-RLS, observe how the training and test error changes as

(run training and test for various choices of the suggested parameters)

(2) Leaving all the other parameters fixed choose an appropriate range [lambda_min:lambda_step:lambda_max] and plot the training error and the test error for each lambda. Use the KCV option to select the optimal lambda and see how it relates to the previous plot.

(3) Leaving all the other parameters fixed choose an appropriate range [n_min:n_step:n_max] and plot the training and test error (what do you observe as n goes to infty?)

(4) Consider gaussian-RLS and perform parameter tuning in this case -- this time together with lambda you'll have to choose and appropriate sigma

(5) If you still have some time compare RLS with nu-method on a kernel of your choice (gaussian is better, why?)