Changes to SpectralKMeans as done by Andy.