@require_partition
def coverage(G, partition):
    intra_edges = intra_community_edges(G, partition)
    total_edges = G.number_of_edges()
    return intra_edges / total_edges
Returns the coverage of a partition.
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/community/quality.py/coverage