brainconn.distance.efficiency_wei

efficiency_wei(Gw, local=False)[source]

The global efficiency is the average of inverse shortest path length, and is inversely related to the characteristic path length.

The local efficiency is the global efficiency computed on the neighborhood of the node, and is related to the clustering coefficient.

Parameters:
  • W (NxN numpy.ndarray) – undirected weighted connection matrix (all weights in W must be between 0 and 1)
  • local (bool) – If True, computes local efficiency instead of global efficiency. Default value = False.
Returns:

  • Eglob (float) – global efficiency, only if local=False
  • Eloc (Nx1 numpy.ndarray) – local efficiency, only if local=True

Notes

The efficiency is computed using an auxiliary connection-length

matrix L, defined as L_ij = 1/W_ij for all nonzero L_ij; This has an intuitive interpretation, as higher connection weights intuitively correspond to shorter lengths.

The weighted local efficiency broadly parallels the weighted

clustering coefficient of Onnela et al. (2005) and distinguishes the influence of different paths based on connection weights of the corresponding neighbors to the node in question. In other words, a path between two neighbors with strong connections to the node in question contributes more to the local efficiency than a path between two weakly connected neighbors. Note that this weighted variant of the local efficiency is hence not a strict generalization of the binary variant.

Algorithm: Dijkstra’s algorithm