brainconn.centrality.diversity_coef_sign

diversity_coef_sign(W, ci)[source]

The Shannon entropy-based diversity coefficient measures the diversity of intermodular connections of individual nodes and ranges from 0 to 1.

Parameters:
  • W (NxN numpy.ndarray) – undirected connection matrix with positive and negative weights
  • ci (Nx1 numpy.ndarray) – community affiliation vector
Returns:

  • Hpos (Nx1 numpy.ndarray) – diversity coefficient based on positive connections
  • Hneg (Nx1 numpy.ndarray) – diversity coefficient based on negative connections