Spectral clustering a grpah into k cluster
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a problem with spectral clustering a graph i want to partition or cluster my graph to k cluster and i dont know which function i should use i have a graph consist of 118 node and i want to partition it into 9 zone or cluster
thank you for helping
clc;clear;close;
a=[1;1;4;3;5;6;8;8;9;4;5;11;2;3;7;11;12;13;14;12;15;16;17;18;19;15;20;21;22;23;23;26;25;27;28;30;8;26;17;29;23;31;27;15;19;35;35;33;34;34;38;37;37;30;39;40;40;41;43;34;44;45;46;46;47;42;42;45;48;49;49;51;52;53;49;49;54;54;55;56;50;56;51;54;56;56;55;59;59;60;60;61;63;63;64;38;64;49;49;62;62;65;66;65;47;49;68;69;24;70;24;71;71;70;70;69;74;76;69;75;77;78;77;77;79;68;81;77;82;83;83;84;85;86;85;85;88;89;89;90;89;89;91;92;92;93;94;80;82;94;80;80;80;92;94;95;96;98;99;100;92;101;100;100;103;103;100;104;105;105;105;106;108;103;109;110;110;17;32;32;27;114;68;12;75;76];
b=[2;3;5;5;6;7;9;5;10;11;11;12;12;12;12;13;14;15;15;16;17;17;18;19;20;19;21;22;23;24;25;25;27;28;29;17;30;30;31;31;32;32;32;33;34;36;37;37;36;37;37;39;40;38;40;41;42;42;44;43;45;46;47;48;49;49;49;49;49;50;51;52;53;54;54;54;55;56;56;57;57;58;58;59;59;59;59;60;61;61;62;62;59;64;61;65;65;66;66;66;67;66;67;68;69;69;69;70;70;71;72;72;73;74;75;75;75;77;77;77;78;79;80;80;80;81;80;82;83;84;85;85;86;87;88;89;89;90;90;91;92;92;92;93;94;94;95;96;96;96;97;98;99;100;100;96;97;100;100;101;102;102;103;104;104;105;106;105;106;107;108;107;109;110;110;111;112;113;113;114;115;115;116;117;118;118];
% G1=[a,b]
f = a.';
d = b.';
G = graph(f,d);
h = plot(G);
H1 = simplify(G)
figure(2)
h2=plot(H1)
% H1 = subgraph(H1,idx)
A1 = adjacency(H1);
I = incidence(H1);
L = laplacian(H1);
e = eig(L);
[V,D] = eigs(L) ;
FG=V(:,2);
FG1=sort(FG)
n=1:1:118;
figure(3)
plot(n,FG1,'r*')
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!