Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

networkx.algorithms.cuts.normalized_cut_size

normalized_cut_size(G, S, T=None, weight=None)[source]

Returns the normalized size of the cut between two sets of nodes.

The normalized cut size is the cut size times the sum of the reciprocal sizes of the volumes of the two sets. [1]

Parameters:
  • G (NetworkX graph)
  • S (sequence) – A sequence of nodes in G.
  • T (sequence) – A sequence of nodes in G.
  • weight (object) – Edge attribute key to use as weight. If not specified, edges have weight one.
Returns:

The normalized cut size between the two sets S and T.

Return type:

number

Notes

In a multigraph, the cut size is the total weight of edges including multiplicity.

References

[1]David Gleich. Hierarchical Directed Spectral Graph Partitioning. <https://www.cs.purdue.edu/homes/dgleich/publications/Gleich%202005%20-%20hierarchical%20directed%20spectral.pdf>