NetworkX

Previous topic

networkx.algorithms.mixing.attribute_mixing_matrix

Next topic

networkx.algorithms.mixing.degree_mixing_dict

networkx.algorithms.mixing.degree_mixing_matrix

networkx.algorithms.mixing.degree_mixing_matrix(G, nodes=None, normalized=True)

Return mixing matrix for attribute.

Parameters :

G : graph

NetworkX graph object.

nodes: list or iterable (optional) :

Build the matrix using only nodes in container. The default is all nodes.

normalized : bool (default=False)

Return counts if False or probabilities if True.

Returns :

m: numpy array :

Counts, or joint probability, of occurrence of node degree.