Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Dr.

Peter Arndt Heinrich-Heine-Universität Düsseldorf


Dr. Konrad Völkel Winter term 2022/23
Machine Learning
Exercise Sheet 6
(3 Exercises, 100 Points)
Due: 22.11.2022, 10:00

Exercise 1: (20 Points)


Given a data set of seven data points x1 . . . x7 , the following distance matrix has been
calculated:  
0 5 7 8 7 6 7
5 0 4 6 6 10 9
 
7 4 0 2 6 8 5
 
D= 8 6 2 0 4 6 7
7 6 6 4 0 3 6
 
6 10 8 6 3 0 4
7 9 5 7 6 4 0

1. Draw the -graph for  = 5.5.

2. Draw the k-nearest neighbor graph for k = 2.

Exercise 2: (60 Points)


ISOMAP (programming task)
We work on the Swiss Roll data set, which is a good example data set to study nonlinear
dimensionality reduction techniques. The data set can be generated using the function
make_swiss_roll from scikit-learn.

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.

3. Implement ISOMAP only using basic Python/NumPy/SciPy functions. Use a k


nearest neighbor graph and an  graph to model the neighborhood relationship
between the data points. Make sure that your weight matrix is symmetric.

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.

You might also like