Warning

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

networkx.algorithms.assortativity.mixing_dict

mixing_dict(xy, normalized=False)[source]

Return a dictionary representation of mixing matrix.

Parameters:
  • xy (list or container of two-tuples) – Pairs of (x,y) items.
  • attribute (string) – Node attribute key
  • normalized (bool (default=False)) – Return counts if False or probabilities if True.
Returns:

d – Counts or Joint probability of occurrence of values in xy.

Return type:

dictionary