We present a novel clustering algorithm for community detection, based on the dynamics towards consensus and spatial transformation. The community detection problem is translated to a clustering problem in the N-dimensional Euclidean space by three stages: (1) the dynamics running on a network is emulated to a procedure of gas diffusion in a finite space; (2) the pressure distribution vectors are used to describe the influence that each node exerts on the whole network; (3) the similarity measures between two nodes are quantified in the N-dimensional Euclidean space by k-Nearest Neighbors method. After such steps, we could merge clusters according to their similarity distances and show the community structure of a network by a hierarchical clustering tree. Tests on several benchmark networks are presented and the results show the effectiveness and reliability of our algorithm.
QC 20170621