- performance(G, partition)¶
Returns the performance of a partition.
Deprecated since version 2.6: Use
The performance of a partition is the number of intra-community edges plus inter-community non-edges divided by the total number of potential edges.
- GNetworkX graph
A simple graph (directed or undirected).
Partition of the nodes of
G, represented as a sequence of sets of nodes. Each block of the partition represents a community.
The performance of the partition, as defined above.
partitionis not a valid partition of the nodes of
Santo Fortunato. “Community Detection in Graphs”. Physical Reports, Volume 486, Issue 3–5 pp. 75–174 <https://arxiv.org/abs/0906.0612>