spectral clustering
问题 First off I must say that I'm new to matlab (and to this site...) , so please excuse my ignorance. I'm trying to write a function in matlab that will use Spectral Clustering to split a set of points into two clusters. my code is as follows function Groups = TrySpectralClustering(data) dist_mat = squareform(pdist(data)); W= zeros(length(data),length(data)); for i=1:length(data), for j=(i+1):length(data), W(i,j)=10^(-dist_mat(i,j)); W(j,i)=W(i,j); end end D = zeros(length(data),length(data));