_greedy_modularity_communities_generator(G, weight=None, resolution=1)
This function performs Clauset-Newman-Moore greedy modularity maximization At each step of the process it yields the change in modularity that will occur in the next step followed by yielding the new community partition after that step.
Greedy modularity maximization begins with each node in its own community and repeatedly joins the pair of communities that lead to the largest modularity until one community contains all nodes (the partition has one set).
This function maximizes the generalized modularity, where :None:None:`resolution`
is the resolution parameter, often expressed as $\gamma$. See ~networkx.algorithms.community.quality.modularity
.
The name of an edge attribute that holds the numerical value used as a weight. If None, then each edge has weight 1. The degree is the sum of the edge weights adjacent to the node.
If resolution is less than 1, modularity favors larger communities. Greater than 1 favors smaller communities.
Yield community partitions of G and the modularity change at each step.
A dict_values of frozensets of nodes, one for each community. This represents a partition of the nodes of the graph into communities. The first yield is the partition with each node in its own community.
The change in modularity when merging the next two communities that leads to the largest modularity.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them