cdlib.algorithms.clauset¶
- cdlib.algorithms.clauset(g_original: object, seeds: list, min_comm_size: int = 3, max_comm_size: int = 50) NodeClustering¶
Clauset local modularity seed-set expansion.
The method greedily expands a seed set by adding the boundary-adjacent node that maximizes Clauset’s local modularity score.
Supported Graph Types
Undirected
Directed
Weighted
Yes
No
Yes
- Parameters:
g_original – a networkx graph
seeds – node list used as the initial community
min_comm_size – minimum community size, default 3
max_comm_size – maximum community size, default 50
- Returns:
NodeClustering object
- Example:
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> coms = algorithms.clauset(G, [0, 2, 3], min_comm_size=3, max_comm_size=10)
- References:
Clauset, A. Finding local community structure in networks. Physical Review E, 72(2), 026132, 2005.