pyeeg.simulate.WilsonCowan

class pyeeg.simulate.WilsonCowan(tau_e=0.008, tau_i=0.008, w_ee=12.0, w_ei=4.0, w_ie=13.0, w_ii=11.0, P=1.0, dt=0.001, seed=42, nonlinearity=<function sigmoid>)

Two-population excitatory/inhibitory Wilson-Cowan rate model.

The mean activities of the excitatory (\(e\)) and inhibitory (\(i\)) populations evolve according to

\[\tau_e \dot{e} = -e + f(w_{ee} e - w_{ie} i + P + I) \tau_i \dot{i} = -i + f(w_{ei} e - w_{ii} i)\]

where \(f\) is the (sigmoidal) nonlinearity. The readout is the difference \(e - i\) between the two populations.

Parameters:
  • tau_e (float) – The time constant of the excitatory population in seconds. Must be positive.

  • tau_i (float) – The time constant of the inhibitory population in seconds. Must be positive.

  • w_ee (float) – The excitatory-to-excitatory coupling weight.

  • w_ei (float) – The excitatory-to-inhibitory coupling weight.

  • w_ie (float) – The inhibitory-to-excitatory coupling weight.

  • w_ii (float) – The inhibitory-to-inhibitory coupling weight.

  • P (float) – The constant external input to the excitatory population.

  • dt (float) – The integration time step in seconds.

  • seed (int) – The random seed used to initialise the node’s random number generator.

  • nonlinearity (callable) – The activation function applied to the population drives. Default is sigmoid().

Raises:

ValueError – If tau_e or tau_i is not positive.

Methods

WilsonCowan.read_out()

Return the scalar readout of the model.

WilsonCowan.simulate([x0, tmax, noise, P])

Simulate the model and return its states and readout.

WilsonCowan.step([I, noise, P])

Advance the model by one integration step (Euler method).