source:
https://arxiv.org/pdf/0803.0476.pdf
https://sites.google.com/site/findcommunities/
- 有很多种 community detection algorithms:
- divisive algorithms: detect inter-community links and remove them from the network
- agglomerative algorithms: merge similar nodes/communities recursively
- optimization methods: based on the maximisation of an objective function
- modularity show the quality of the partitions results
- The modularity of a partition is a scalar value between -1 and 1
- measures the density of links inside communities as compared to links between communities
- can also be as an objective function to optimize
Louvain method:
Two phases (repeated iteratively):
- First phase
- assign a different community to each node of the network. (这个时候,有多少个点就有多少个community)
- for each node i, consider the neighbors j of i and evaluate the gain of modularity that would take place by removing i from its community and by placing it in the community of j. The node i is then placed in the community for which this gain is maximum
- If no positive gain is possible, i stays in its original community
- repeat and sequentially for all nodes until no further improvement can be achieved. The first phase is then complete.
- second phase (build a new network whose nodes
are now the communities found during the first phase.)
- weights between the new nodes are given by the sum of the weight of the links between nodes in the corresponding two communities
- Links between nodes of the same community lead to self-loops for this community in the new network.
- Once this second phase is completed, it is then possible to reapply the first phase of the algorithm to the resulting weighted network and to iterate.
- 这两个 phase 一起打包看作 “pass”的话,
- the number of meta-communities decreases at each pass
- most of the computing time is used in the first pass.
- The passes are iterated until there are no more changes and a maximum of modularity is attained.
- The first pass of the algorithm finds the natural partition of the network.
- The second pass finds the global maximum of modularity where cliques are combined into groups of two.
- This first phase stops when a local maxima of
the modularity is attained - the output of the algorithm depends on the order in which the nodes are considered.
总结:
每个 pass 有两个阶段(phase):
第一个阶段,modularity is optimized by allowing only local changes of communities。
第二个阶段,the found communities are aggregated in order to build a new network of communities.
The passes are repeated iteratively until no increase of modularity is possible