Skip to content

Commit

Permalink
Added the recurrence strength parameter r in BernoulliGLM to document…
Browse files Browse the repository at this point in the history
…ation and examples
  • Loading branch information
JakobSonstebo committed Sep 17, 2023
1 parent b48f948 commit 79b0466
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
5 changes: 3 additions & 2 deletions docs/introduction/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ in the :class:`BernoulliGLM` class, using the same parameters as in the original
.. code-block:: python
model = BernoulliGLM(
alpha= 0.2, # Decay rate of the coupling strength between neurons (1/ms)
beta= 0.5, # Decay rate of the self-inhibition during the relative refractory period (1/ms)
alpha=0.2, # Decay rate of the coupling strength between neurons (1/ms)
beta=0.5, # Decay rate of the self-inhibition during the relative refractory period (1/ms)
abs_ref_scale=3, # Absolute refractory period in time steps
rel_ref_scale=7, # Relative refractory period in time steps
abs_ref_strength=-100, # Strength of the self-inhibition during the absolute refractory period
rel_ref_strength=-30, # Initial strength of the self-inhibition during the relative refractory period
coupling_window=5, # Length of coupling window in time steps
theta=5, # Threshold for firing
r=1, # Parameter controlling the recurrence strength
dt=1, # Length of time step (ms)
)
Expand Down
3 changes: 3 additions & 0 deletions docs/tutorials/stimuli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ After we've defined the model and the stimulus, we can simulate the network and
rel_ref_strength=-30,
alpha=0.2,
beta=0.5,
r=1
)
# Define stimulus and add it to the model
Expand Down Expand Up @@ -92,6 +93,7 @@ Before we add the stimulus to the model, we'll run a simulation without it to se
rel_ref_strength=-30,
alpha=0.2,
beta=0.5,
r=1
)
spikes = model.simulate(network, n_steps=n_steps)
Expand Down Expand Up @@ -156,6 +158,7 @@ that is close to the frequency of the stimulus.
rel_ref_strength=-30,
alpha=0.2,
beta=0.5,
r=1
)
stimulus = SinStimulus(
Expand Down
3 changes: 2 additions & 1 deletion examples/large_scale_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@
" rel_ref_scale=5,\n",
" rel_ref_strength=-30,\n",
" beta=0.1,\n",
" r=1\n",
")"
]
},
Expand Down Expand Up @@ -842,7 +843,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.10.11"
},
"orig_nbformat": 4
},
Expand Down
25 changes: 14 additions & 11 deletions examples/simulate_with_stimulus.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/working_with_stimulus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
" rel_ref_strength=-30, \n",
" alpha=0.2,\n",
" beta=0.5,\n",
" r=1,\n",
")\n",
"model.add_stimulus(stim)\n",
"\n",
Expand Down Expand Up @@ -233,6 +234,7 @@
" rel_ref_strength=-30, \n",
" alpha=0.2,\n",
" beta=0.5,\n",
" r=1,\n",
")"
]
},
Expand Down Expand Up @@ -428,6 +430,7 @@
" rel_ref_strength=-30, \n",
" alpha=0.2,\n",
" beta=0.5,\n",
" r=1,\n",
")\n",
"\n",
"\n",
Expand Down

0 comments on commit 79b0466

Please sign in to comment.