DiffusiveCoupling#

class brainmass.DiffusiveCoupling(x, y, conn, k=1.0)#

Diffusive coupling.

This class implements a diffusive coupling mechanism for neural network modules. It simulates the following model:

\[ \mathrm{current}_i = k * \sum_j g_{ij} * (x_{D_{ij}} - y_i) \]

where:
  • \(\mathrm{current}_i\): the output current for neuron \(i\)

  • \(g_{ij}\): the connection strength between neuron \(i\) and neuron \(j\)

  • \(x_{D_{ij}}\): the delayed state variable for neuron \(j\), as seen by neuron \(i\)

  • \(y_i\): the state variable for neuron i

Parameters:
  • x (PrefetchDelayAt | PrefetchDelay | Prefetch | Callable) – The delayed state variable for the source units.

  • y (PrefetchDelayAt | PrefetchDelay | Prefetch | Callable) – The delayed state variable for the target units.

  • conn (Callable | Array | ndarray | bool | number | bool | int | float | complex | Quantity | Param) – The connection matrix (1D or 2D array) specifying the coupling strengths between units.

  • k (Callable | Array | ndarray | bool | number | bool | int | float | complex | Quantity | Param) – The global coupling strength. Default is 1.0.

Return type:

Any

init_state(*args, **kwargs)[source]#

State initialization function.