SVG Model¶
-
class
svg_model.model.
SVG_Model
(size: Union[int, Dict[str, int]] = 1, weights: Tuple[float, float] = (0.5, 1.0), noise_amplitude: Union[float, Dict[str, float]] = 0.1, tau: Union[float, Dict[str, float]] = 1, delay: Union[float, Dict[str, float]] = 1, resting: Union[float, Dict[str, float]] = 1, random_init: bool = True)¶ The model is composed of (nonspiking) neuron groups according the modules described in the paper, which are connected with synapses with two fixed weights (the black and gray lines).
Each neuron in each module is governed by a differential equation that exponentially returns it to the voltage set by
resting
, with stochastic differential noise of amplitudenoise_amplitude
Postsynaptic neurons receive the voltage of the pre-synaptic neuron with some
delay
scaled byweights
- Parameters
size (int, dict) –
Size of modules, if an int (default: 1), size for all modules, otherwise, a dict with {‘module_name’: size}
Note
Only modules of size == 1 are implemented currently, this is a placeholder for different connectivity modes
weights (tuple) – Weights for (“minor”, “major”) connections, tuple of two floats
noise_amplitude (float, dict) – Amplitude of noise, if float, noise for all. otherwise a dict with {‘module_name’: amplitude}
tau (float, dict) – Time constant (s) for decay to
resting
value, if float, same for all modules, otherwise a dict with {‘module_name’: tau}delay (float, dict) – delay (s) of module output, if float, same for all modules, otherwise a dict with {‘module_name’: delay}
resting (float, dict) – resting value to decay 2. if float, same for all modules, otherwise a dict with {‘module_name’: resting}
random_init (bool) – Whether neurons should be initialized with some random initial value (default: True)
-
modules
¶ Dictionary mapping module name to
brian2.NeuronGroup
object- Type
dict
-
synapses
¶ Dictionary mapping (‘from’, ‘to’) module name tuples to their
brian2.Synapse
object- Type
dict
-
monitors
¶ Dictionary mapping module name to a brian
StateMonitor
that stores the values of a run- Type
dict
-
MODULES
= ('distress', 'social_behavioral', 'body_ownership', 'gender', 'culture', 'feedback')¶
-
CONNECTIVITY
: numpy.ndarray = array([[0, 1, 1, 2, 0, 0], [1, 0, 1, 2, 0, 0], [1, 1, 0, 2, 0, 0], [2, 2, 2, 0, 0, 0], [1, 1, 0, 2, 0, 0], [1, 1, 0, 2, 0, 0]])¶ Connectivity matrix between modules. Axes are indexed by
SVG_Model.MODULES
. Synapses connect from axis 0 (rows) to axis 1 (columns). “Minor” connections are denoted with 1, “Major” connections are denoted with 2. Weights are constructed from theweights
parameter.
-
run
(duration: float = 1, dt: float = 0.001, reset: bool = True)¶ Run the model for
duration
seconds.Values are recorded to monitors in :attr:`.monitors
- Parameters
duration (float) – Seconds to run model
dt (float) – timestep size of model simulation in seconds
reset (bool) – whether to reset the network to its initial state on start
-
collect_monitors
() → pandas.core.frame.DataFrame¶ After a
run()
, return a dataframe of the monitored values- Returns
pandas.DataFrame
- dataframe of module values over time
-
_init_neurons
()¶ Create
brian2.NeuronGroup
objects for each of the modules, then connect them together!
-
_make_module
(name: str) → brian2.groups.neurongroup.NeuronGroup¶
-
property
size
¶
-
property
noise_amplitude
¶
-
property
tau
¶
-
property
delay
¶
-
property
resting
¶