

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Machine Learning (CS 5350/CS 6350) Due 08 Mar 2007
Note: Please submit the written aspects of assignments in postscript or PDF format only. I highly recom- mend you use LATEX to prepare the assignments. A solution will be posted here after the due date. See http://www.cs.utah.edu/classes/cs5350/handin.html for handin instructions.
Complete the following exercise from PRML: 9.14, 9.15.
Bonus: 12.27.
There are, again, two parts to the programming assignment. The first part is for clustering, the second part is for dimensionality reduction. The second part is quite trivial, but requires that you are successful in the first. CS6350 students have to do a bit more work in the first part.
Here, we implement EM for Gaussian mixture models. I have provided a Matlab shell for this as well as data. You need to implement: (1) initialization; (2) the E-step; (3) the M-step; and (4) the computation of the complete and incomplete data log-likelihoods. You should use the algorithm with full covariance matrices.
In the process of building the Gaussian mixture models, you will plot—by iteration—the complete data log likelihood, and the incomplete data log likelihood. A good way to debug your code—which is espe- cially difficult for unsupervised learning algorithms—is to make sure that the incomplete data log likelihood monotonically increases. There are various plotting commands strewn throughout the code to plot the complete/incomplete likelihood and so you should be able to debug that way.
Once you have the GMM algorithm running, we will try it with different values of k ∈ { 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }. For each of these, you should run the GMM with 10 different initializations and choose as your final clustering the 1 in these 10 with the highest complete log likelihood. Once you have these complete log likelihoods, plot them as a function of k. Which value of k would you choose based on these plots?
For this part of the assignment, you should hand in: you code; the plot of the incomplete/complete likelihood for the best run for each k; the plot of k vs. the complete log likelihood; and an answer to the “choose k” question.
HW3: Unsupervised Learning 2
(This section is also a bonus problem for CS5350 students.)
Here, you will implement k-mediods. After doing EM, this should be significantly easier. The important aspect of this problem is to try using different distance metrics. We will use, in particular: Euclidean (2 ) distance, absolute ( 1 ) distance, and 4 distance. The generalp distance is defined below for reference:
||x − x′||p =
d
|xd − x′ d| p
) 1 /p
Using the same values for k, the same initialization and also 10 passes-per-k, run k-mediods on the data provided for this assignment. Again, for each of the 10 passes, choose the best one. In the case of k-mediods, you should compute the intracluster distance for each clustering and choose the one with the lowest value. Again, plot the intracluster distances as a function of k and choose one.
You should repeat the above process for each of the three norms. Compare the plots qualitatively: did you choose the same k for each? Hand in what you handed in for the GMM problem.
I have provided code in pca.m for doing PCA (although you will need to do a bit of preprocessing on the data to get it in to a suitable form for PCA-ification).
First, use PCA to project the data for this assignment into d = { 1 , 2 , 3 , 4 , 5 } dimensions. Compute the reconstruction error for each value of d. Plot the reconstruction error as a function of d.
Next, take the projection of the data into 2 dimensions and plot it. Do you see any emergent clusters? Use the code provided to color this plot according to a clustering. Use the clusterings you found for the GMM part of the assignment, for k = { 2 , 3 , 4 }. Which looks most pleasing visually? Or are they all rubbish? If so, do you think this is due to the GMM being a poor model or PCA doing poor dimensionality reduction?
You should hand in the plot of the reconstruction errors, the three 2D plots of the data, and answers to the above questions.
CS6350 Students Only: Do the same, but for the clusterings found by k-mediods. Just use k = 3, but look at the clusters for the three different `p norms we used. Do you see a qualitative difference between them? Hand in the 3 plots and an analysis.