Functions for computing the Kernighan–Lin bipartition algorithm.

kernighan_lin_bisection(G[, partition, ...]) Partition a graph into two blocks using the Kernighan–Lin algorithm.




k_clique_communities(G, k[, cliques]) Find k-clique communities in graph using the percolation method.

Label propagation

Asynchronous label propagation algorithms for community detection.

asyn_lpa_communities(G[, weight]) Returns communities in G as detected by asynchronous label propagation.

Measuring partitions

Functions for measuring the quality of a partition (into communities).

coverage(\*args, \*\*kw) Returns the coverage of a partition.
performance(\*args, \*\*kw) Returns the performance of a partition.

Partitions via centrality measures

Functions for computing communities based on centrality notions.

girvan_newman(G[, most_valuable_edge]) Finds communities in a graph using the Girvan–Newman method.