netneurotools.metrics.search_information

netneurotools.metrics.search_information(W, D, has_memory=False)[source]

Calculate search information.

This function implements search information, computes the amount of information (measured in bits) that a random walker needs to follow the shortest path between a given pair of nodes.

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

Warning

Test before use.

Parameters:
  • W ((N, N) ndarray) – Weighted/unweighted, directed/undirected connection weight matrix.

  • D ((N, N) ndarray) – Weighted/unweighted, directed/undirected connection length or distance matrix. Please do the weight-to-distance beforehand.

  • has_memory (bool, optional) – Memory for random walker, Default: False

Returns:

SI – Pairwise search information matrix. The diagonal is set to NaN. Edges without a valid shortest path are set to np.inf. It is not guaranteed to be symmetric even if input is symmetric.

Return type:

(N, N) ndarray

References