Research Article
Neighbor Similarity Based Agglomerative Method for Community Detection in Networks
Algorithm 3
PCM(, ): merge small or sparse communities.
Input: , the preliminary community structure; , the community-metric threshold | |
Output: , the final community structure | |
1 Initialize , which is used to record the community structure: | |
2 Calculate the community metric for each of the preliminary communities: | |
foreach do | |
3 Select the community with the minimal community metric, denote its index as : | |
4 Identify the most similar community with , denote its index as : | |
5 Merge communities and to form a new community: | |
; ; | |
6 Calculate the community metric for the new community: | |
7 Replace the two communities and with the new community to reflect the merging effect: | |
8 Repeat steps 3 through 7, until | |
9 return |