Friday, October 7, 2011

MLPR Lab4 + Discussion board

Hi there,

we have good news about the Lab assignment: mr. Liem just activated the discussion board on blackboard, so now we have more possibilities to get in touch with the professors, even outside the labs.. Check it out!

Enjoy :-)
Dario

4 comments:

  1. Last part of exercise 1:

    "To decide on the number of dimensions to use, take into account how many free parameters each of the classifiers has, which need to be adapted during training (take into account input parameters, their dimensionality and their properties). Note, that there should be less free parameters than training samples during training to get meaningful results."

    So has anyone done this part yet? How did you decide on the number of dimensions?

    ReplyDelete
  2. Hey that's cool, thanks for the news Dario!

    @Alex: what you want to do is to count the number of parameters that must be learnt in each classifier. So for the GMM that would be the mu's, pi's and (symmetric) Sigma's. Then once you have a formula for it in D (number of dimensions) equate it to the number of training samples and solve for D.

    ReplyDelete
  3. hello,

    i have a question about ex.1 of the lab. so at one point we are asked to take top-20/-100 pca dimensions and project some images onto the corresp. linear subsopaces. but when we do that, we get a vector, and when we visalize it -- how do we compare it with the original (reshaped) vector? shouldn't we reshape the new vector as well? or what should we do? we're lost

    ReplyDelete
  4. Hi, here is how we got all the needed images for ex.1 (thx Mihai!):

    Eigen-pedestrians
    =================
    An eigen-pedestrian is just a column of the coefficient matrix you get from princomp():

    % Build the dataset mixing ped. and garbage
    X=[ped_train_int_25x50(:,2:end);garb_train_int_25x50(:,2:end)];

    %Subtract MU (not sure: maybe it is
    % done automatically by princomp)
    MU = mean( X );
    X = X - repmat(MU, size(X,1),1);

    %Run princomp
    [coeff,scores,latent]=princomp(X);

    %Get a column of COEFF (eg. the 5th)
    %This is the eigen-pedestrian
    EIGEN = coeff(:,5);
    imshow( reshape(EIGEN,50,25), [] )


    TOP-X PCA DIMENSIONS
    ====================
    To project X PCA dimensions into the corresponding subspace you can follow the procedure on the slides (lect10, slide 31) [note that the slide contains an error: one blue circle is misplaced (pls write if you need more details)]

    % Invert the coefficients
    TCOEFF = coeff';

    %Get/project the x (eg. 100) dimensions
    X100=scores(:,1:100)*TCOEFF(1:100,:); %recover dimensions
    X100=X100+repmat(MU,size(X,1),1); %re-add MU

    % Display an image (eg. the 3rd)
    PROJ = X100(3,:);
    imshow( reshape(PROJ,50,25), [] )

    That's all, i hope that it is also correct :-)

    ReplyDelete