Algorithm 1 The weighted co-association matrix based community fusion algorithm, WCMFA, which detects community structure in attributed networks based on the two-layer representation |
-
Input:
: an attributed network; : a set of base community detector; N: the number of candidate community partitions; M: the total number of node in the attributed network ; : the node pair similarity measure for topological structure; : the node pair similarity measure for attribute set; : a similarity matrix based clustering algorithm.
-
Output:
: the consensus community partition.
-
1:
;
-
2:
//calculate the candidate community partitions ;
-
3:
for
do
-
4:
if
is an instance of for
then
-
5:
;
-
6:
else
-
7:
;
-
8:
calculate the matrix associated with ;
-
9:
end if
-
10:
end for
-
11:
;
-
12:
//community fusion;
-
13:
for
do
-
14:
if
is generated by
then
-
15:
;
-
16:
else
-
17:
;
-
18:
end if
-
19:
end for
-
20:
for
do
-
21:
for
do
-
22:
if
then
-
23:
continue;
-
24:
end if
-
25:
;
-
26:
for
do
-
27:
;
-
28:
end for
-
29:
;
-
30:
end for
-
31:
end for
-
32:
;
-
33:
;
-
34:
return the consensus community partition .
|