Lab Assignments

Examination

Booking system for lab examination times will be available later on the Course wiki.

For those who are uncertain about their data we will reserve drop-in hours.

Note:

  • The lab examinations are not taking place in front of a computer.

  • You have only 10 minutes at your disposal so come well prepared!

Instructions

Lab 1 (Decision Trees) [bonus deadline 2016-09-14]

Note: you can choose if you want to do this lab in Python or Matlab.

Lab 2 (Support Vector Machines) [bonus deadline 2016-10-05]

Lab 3 (Bayes Classifiers and Boosting) [bonus deadline 2016-10-14]

NB. Lab 3 (Python version) may will be has been updated. Matlab version to be has been amended also   (09-30 and then 10-08).

Atsuto Maki skapade sidan 18 augusti 2016

Lärare Atsuto Maki ändrade rättigheterna 18 augusti 2016

Kan därmed läsas av lärare och ändras av lärare.

Lärare Atsuto Maki ändrade rättigheterna 26 augusti 2016

Kan därmed läsas av studerande och lärare och ändras av lärare.

Lärare Atsuto Maki ändrade rättigheterna 29 augusti 2016

Kan därmed läsas av alla inloggade användare och ändras av lärare.
En användare har tagit bort sin kommentar
kommenterade 5 september 2016

When will we know if Lab 3 will be updated or not? In case someone might want to complete the labs earlier.

Assistent kommenterade 5 september 2016

Any version of Lab3 is acceptable. The old Matlab version is known to be stable. The Python version was released last year and might need some code polishing but the assignment shouldn't change.

Lärare kommenterade 5 september 2016

Yes, Lab 3 will be updated. Further to the post from Alex, please consider the versions from last year as a reference. A note on the estimated schedule will be put here once it has become available.

En användare har tagit bort sin kommentar
kommenterade 5 september 2016

Hello! I have a problem... when I click on files needed in Lab 1, it says

Forbidden

You don't have permission to access /utbildning/kth/kurser/DD2431/ml12/dectrees.tgz on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Any solutions? Do someone else have the same trouble?

Thank you very much!

En användare har tagit bort sin kommentar
Assistent kommenterade 6 september 2016

File access error on this page has been reported. Meanwhile feel free to exchange files in these comments. Could anybody link "dectrees*" files here please?

Assistent kommenterade 6 september 2016

The file access error on this page has been resolved.

kommenterade 9 september 2016

When optimizing the fraction parameter in Lab 1 (assignment 4), the result varies a lot from time to time, of course due to the randomness in the partition of the data. 

This means that there might not be a clear conclusion to be drawn from this assignment. We now wonder how we should think about this assignment. Should we try to repeat the evaluation many times and then use the mean value?

Lärare Atsuto Maki ändrade rättigheterna 9 september 2016

Kan därmed läsas av alla och ändras av lärare.
Assistent kommenterade 9 september 2016

Indeed, in order to get reliable results in the assignment 4 of lab1 one should repeat evaluations and report the average data.

kommenterade 9 september 2016

Hello! 

About when can we expect lab 3 to be published? 

Thanks! 

kommenterade 12 september 2016

@Alexander Kuzmin @Bonny Wong

Hello!

The Python version will be polished during the coming week, addressing some of the feedback that we got from last year. The new version will be available on Tuesday next week (20/9) at the latest.

Cheers

En användare har tagit bort sin kommentar
kommenterade 16 september 2016

Hello, Lab 2 question:

For the Radial basis function we have (x_i - y_j)^2 in the exponent. Both are vectors so i was wondering how it is supposed to sum up to a scalar? Is it supposed to be the L1 or L2 norm (maybe makes more sense since we have "Gaussian distr.")?

Maybe I'm just retarded..

Lärare kommenterade 19 september 2016

Use the L2-norm, which corresponds to Euclidian distances.

En användare har tagit bort sin kommentar
kommenterade 24 september 2016

Is Lab 3 coming any time soon? It's three weeks left until the deadline now.

Assistent kommenterade 25 september 2016

The intention is to release the revised lab3 in the coming week. It is basically ready, we need to discuss it between TAs.

kommenterade 27 september 2016

Are u1.nada.kth.se or u2.nada.kth.se running? I can't log in remotely in any of them (couldn't resolve hostname).

Lärare kommenterade 28 september 2016

I think these machines have been renamed (or replaced by) share-01.csc.kth.se and share-02.csc.kth.se.

kommenterade 30 september 2016

I have not have any bonus points for lab 1 reported in Rapp although the lab was presented before the bonus deadline. When are the bonus points registered in Rapp?

Assistent kommenterade 30 september 2016

At the moment, Rapp does not show bonus points correctly. We shall investigate this. Please wait. Bonus points will be calculated automatically depending on the dates of presentations.

Lärare kommenterade 30 september 2016

Now!

kommenterade 2 oktober 2016

My partner and I spent 3.5h getting the packages for Lab 2 to work to no avail (Windows). We might be doing something wrong but I think we're computer savvy enough to not be missing something obvious. Is it supposed to be this difficult?

kommenterade 2 oktober 2016

@Adam

I'm assuming it's complaining about compilers? I had similar problems and couldn't bother to fix them, in the end I started to use Anaconda: https://www.continuum.io/downloads 

It comes with a bunch of packages and includes easy ways to install new ones. 

kommenterade 2 oktober 2016

@Adam

Do you have facebook? I can go through it with you step by step if you want to have the packages in your computer. I also have windows.

kommenterade 3 oktober 2016

I have a problem while install the cvxopt in Windows 10 and Python 3.5;

after the installation commad: python setup.py build --compiler=mingw32

An error shows: 

src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:359:20: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
clock_gettime (CLOCK_MONOTONIC, &t) ;
^
src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:359:20: note: each undeclared identifier is reported only once for each function it appears in
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1

any help would be greatly appreciated

kommenterade 3 oktober 2016

Hej,

I'm having the same problem as Adam, yesterday I tried to get the packages but it somehow didn't work out, saw these comments, can anyone help me on this?

My facebook is Parsa Broukhiyan and I have windows as well.

Thank you in advance

kommenterade 3 oktober 2016

I hate to say it but have you considered - especially so close to the bonus deadline - to solve it on a Linux machine (either in the computer rooms or remotely)? It runs fine on the Linux machines in the computer rooms and I'm sure there are lot more people that could help you.

kommenterade 3 oktober 2016

Arne that was my plan don't know why I forgot, heading to the computer machines now then lol :D

Thanks mate ;)

kommenterade 3 oktober 2016

You can run it remotely using SSH with X-window forwarding using MobaXterm (host u-shell.csc.kth.se, port 22).

kommenterade 3 oktober 2016

Hi!

Since many of you have had problems installing cvxopt for windows i made a small blog with instructions. The official installation methods are usually not so straight foward, so I always use unofficial binaries, and they've worked for me so far.

http://cvxopt4win.blogspot.se/2016/10/cvxopt-installation-guide-for-windows.html

The process should be quite easy and quick :)

kommenterade 3 oktober 2016

Thanks a lot for all of the offers to help and the blog post!

We ended up just doing it on the school computers.

kommenterade 7 oktober 2016

I cannot get the matlab code for plotting the two new datasets to work. What should data be (in the discriminant calls)?

I also get "Undefined variable colorList."

kommenterade 8 oktober 2016

Hey Erik,

Yes, data should be a concatenation of z1 and z2 and colorList should be assigned from the getListOfDistinctColors function. We will change the description to include explicit assignments of these two variables. We will get back to you during the day with this.

kommenterade 8 oktober 2016

Hej Erik och andra som har problem med MATLAB versionen. En ny version kommer snart att läggas upp på den här sidan. Under tiden har jag lagt upp en version med rättelser på KTH box: https://kth.box.com/s/1kx34vm80z5xlh0ay5m1hox9e7hv3avr .

En användare har tagit bort sin kommentar
En användare har tagit bort sin kommentar
En användare har tagit bort sin kommentar
En användare har tagit bort sin kommentar
En användare har tagit bort sin kommentar
En användare har tagit bort sin kommentar
kommenterade 11 oktober 2016

Hi!

I’m a bit confused on how I should calculate the products in equation 11 in python (lab3). Right now I’m stuck on the middle term: (x* - mu_k)*sigma_k* (x* - mu_k)^T, and I get an ValueError message for the shapes when trying to broadcast.
For example, if I try it for just one class first, class 0:

(x*-mu_k) gives me a matrix of shape (200,2)

sigma[0] is of shape (2,2)

and this gives the error message mentioned above. Am I missing something obvious? I guess I’m confused on how to multiply the four values of the sigma vector with x*.

kommenterade 11 oktober 2016

Hi Michael,

broadcasting will work for x - mu_k as you noted. However, it will not work when computing the product as you expressed it now. Note that sigma_k needs to be inverted in Equation 11, but that it is diagonal, which might simplify the inverse. Also note, that you can compute (x* - mu_k)*sigma_k (or (x* - mu_k)*sigma_k^-1). How might you then combine this with the additional (x* - mu_k) to get what amounts to a dot product for every row?

Good luck

Nils

kommenterade 11 oktober 2016

Hi

The data in the bb-help file in the python zip folder does not seem to match the data files in this same folder. It is the same file as the debugging help for the matlab version. Is there a new bb-help file for the python version anywhere? 

Cheers,
William 

kommenterade 11 oktober 2016

Hi,

there is no bb-help file in the python lab as far as I know (or see). There is no new bb-help file for the python lab either. Do you need to debug one of your algorithms?

Cheers

Nils

kommenterade 11 oktober 2016

Oh I see.

I just wanted a convenient way of verifying that I had completed the steps, which the document says it is for. I'll just continue with the lab then. 

Thank you!

kommenterade 12 oktober 2016

Ok, thanks for the help Nils! I think I've got it:-)

En användare har tagit bort sin kommentar
En användare har tagit bort sin kommentar
Feedback Nyheter