Research Article

A Node Influence Based Label Propagation Algorithm for Community Detection in Networks

Algorithm 1

Label propagation algorithm for community detection in networks (LPA).
Input: .
Output: the result of community detection.
(1) Initialization: assign a unique label to each node in the network, .
(2) Iteration of label propagation:
 (a) Set ;
 (b) Arrange the nodes of the network in random order, and store the results in the vector .
 (c) For each node , where are
neighbors of those have already been updated in the current iteration and are
neighbors those are not yet updated in the current iteration. The function here returns the label
that the maximum number of its neighbors has. If multiple labels simultaneously have the
maximum number, then randomly select one of them to assign to the node.
 (d) If the label of every node does not change anymore, then stop the algorithm. Else, set and go to Step (b).
(3) Community division: divide all nodes share the same label into a community; the type of labels
indicates the number of communities.