function idx = spectral_clustering(W, k)
D = diag(sum(W));
L = D-W;
opt = struct('issym', true, 'isreal', true);
[V dummy] = eigs(L, D, k, 'SM', opt);
idx = kmeans(V, k);
end
Spectral Clustering 的简单 Matlab 实现
最新推荐文章于 2023-12-08 21:23:46 发布