netneurotools.metrics.diffusion_efficiency
- netneurotools.metrics.diffusion_efficiency(W)[source]
Calculate diffusion efficiency.
The diffusion efficiency between nodes i and j is the inverse of the mean first passage time from i to j, that is the expected number of steps it takes a random walker starting at node i to arrive for the first time at node j. Note that the mean first passage time is not a symmetric measure – mfpt(i,j) may be different from mfpt(j,i) – and the pair-wise diffusion efficiency matrix is hence also not symmetric.
This function is adapted and optimized from the Brain Connectivity Toolbox.
Warning
Test before use.
- Parameters:
W ((N x N) ndarray) – Weighted/unweighted, direct/undirected connection weight/length array
- Returns:
GE_diff (float) – Global diffusion efficiency
E_diff ((N x N) ndarray) – Pair-wise diffusion efficiency array
References