networkit.correlation

class networkit.correlation.Assortativity(G, data)

Bases: Algorithm

Assortativity computes a coefficient that expresses the correlation of a node attribute among connected pairs of nodes.

Parameters:
  • G (networkit.graph) – The input graph.

  • data (list(float)) – Numerical node value array.

getCoefficient()

Return the assortativity coefficient.

Returns:

The assortativity coefficient.

Return type:

float