Professional Documents
Culture Documents
ML 2022 Sheet 06
ML 2022 Sheet 06
1. Generate a swiss roll data set of 800 points using the random seed 1234. Produce
a 3D scatter plot of the swiss roll. Data points that are next to each other should
have a similar color.
2. Perform a PCA of the swiss roll data. Show the scatter plot for the first two principal
components and explain it briefly.
4. Try to find a good value for k and . What might go wrong when you choose
inappropriate values?
5. Reduce the number of dimensions of the swiss roll from three to two. Visualize your
results using a colored scatter plot. Do you see any improvement over PCA?
1
Exercise 3: (20 Points)
Locally linear embedding
For embeddings Y = [y1 , . . . , yn ] ∈ Rd×n and weights W ∈ Rn×n show that
n
X n
X
||yi − Wij yj ||22 = tr(Y M Y T ),
i=1 j=1
where
M = In − W − W T + W T W
and In being the n × n identity matrix.