pyphi.landscape.weight_axis#

pyphi.landscape.weight_axis(unit_functions, weights, index, **kwargs)[source]#

Return a parameter axis varying one weight of a generated substrate.

Parameters:
  • unit_functions (str or Callable or Iterable) – Unit function(s), as accepted by pyphi.substrate_generator.build_substrate().

  • weights (ArrayLike) – The weight matrix; weights[i, j] is the connection from unit i to unit j. Copied on every call — the input is never mutated.

  • index (tuple[int, int]) – The (i, j) entry to vary.

  • kwargs (Any)

Returns:

Callable[[float], Substrate] – A builder mapping a parameter value θ to the substrate built from the weight matrix with weights[index] = θ. Additional keyword arguments are forwarded to build_substrate on every call.

Return type:

Callable[[float], Any]

Notes

Setting the weight to exactly 0 removes the connection from the derived connectivity matrix (cm = weights != 0), a discrete topology change: the analysis at θ = 0 may short-circuit as reducible even where the values at θ = ±ε do not.