Question: ( 2 ^ ( pt ) ) Consider the two - moon data set of size 5 0 0 times 2 which can be
pt Consider the twomoon data set of size times which can be downloaded via
from sklearn.datasets import makemoons
xy makemoons noise randomstate kmeans on the twomoon data set with k ie using the
following steps to classify the data set:
a Create a fully connected graph with the weight between the i th data point xi and the j th data point xj
defined by Wijexpxixjsigma with sigma
b Compute the symmetric normalized graph Laplacian Lsym
c Find the two eigenvectors corresponding to the two smallest eigenvalues of Lsym and get a matrix
UinRntimes
d Apply kmeans clustering to the matrix U to get clusters, and visualize the clustering.
e Compare your spectral clustering result with the kmeans one. Comment on your observations.
Solve using python
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
