Implemented Spectral Clustering.