netneurotools.metrics.resource_efficiency_bin

netneurotools.metrics.resource_efficiency_bin(W_bin, lambda_prob=0.5)[source]

Calculate resource efficiency and shortest-path probability.

The resource efficiency between nodes i and j is inversly proportional to the amount of resources (i.e. number of particles or messages) required to ensure with probability 0 < lambda < 1 that at least one of them will arrive at node j in exactly SPL steps, where SPL is the length of the shortest-path between i and j.

The shortest-path probability between nodes i and j is the probability that a single random walker starting at node i will arrive at node j by following (one of) the shortest path(s).

This function is adapted and optimized from the Brain Connectivity Toolbox.

Warning

Test before use.

Parameters:
  • W ((N x N) array_like) – Binary (unweighted) undirected connection matrix.

  • lambda_prob (float, optional) – Probability of reaching the target node. Default: 0.5

Returns:

  • E_res ((N x N) ndarray) – Resource efficiency array

  • prob_spl ((N x N) ndarray) – Shortest-path probability array

References