Skip to content
Snippets Groups Projects
Commit 1e9c2a94 authored by ac_cx's avatar ac_cx
Browse files

spectral cluster return Y

parent f0700905
Branches
No related tags found
No related merge requests found
...@@ -56,6 +56,7 @@ function [idx,Y]= SpectralCluster(A,k) ...@@ -56,6 +56,7 @@ function [idx,Y]= SpectralCluster(A,k)
NREP=50; NREP=50;
if (1==k) if (1==k)
idx=ones(size(A,2),1); idx=ones(size(A,2),1);
Y = []; % ack TODO need Y for 1?
return; return;
end end
for i=1:size(A,1) for i=1:size(A,1)
...@@ -73,6 +74,5 @@ for i=1:size(X,1) ...@@ -73,6 +74,5 @@ for i=1:size(X,1)
end end
idx=kmeans(Y,k,'emptyaction','singleton','replicates',NREP); idx=kmeans(Y,k,'emptyaction','singleton','replicates',NREP);
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment