brainmass.sigmoidal_jansen_rit_coupling#
- brainmass.sigmoidal_jansen_rit_coupling(delayed_x, conn, k=1.0, cmin=0.0, cmax=0.005, midpoint=6.0, r=0.56)#
Sigmoidal Jansen-Rit coupling kernel (function form, pre-nonlinearity).
The TVB
SigmoidalJansenRitcoupling: the sigmoid is applied to each source before the network sum (a firing-rate transfer of the presynaptic potential),\[c_i = k \sum_j w_{ij} \, \sigma_{\mathrm{JR}}(x_j), \qquad \sigma_{\mathrm{JR}}(x) = c_{\min} + \frac{c_{\max} - c_{\min}}{1 + e^{\,r\,(\mathrm{midpoint} - x)}}.\]The source
x_jis whatever the caller prefetches – e.g. the Jansen-Rity1 - y2pyramidal input.- Parameters:
delayed_x (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Zero-arg callable (e.g. aPrefetch/prefetch_delay) or array returning the presynaptic source, shaped(..., N_out, N_in)or flattened(..., N_out * N_in).conn (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Connection weights,(N_out, N_in)or square-flattened(N_out * N_in,).k (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Global coupling strength (TVBG;G ≡ k).cmin (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Lower asymptote of the sigmoid (firing rate asx → -∞).cmax (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Upper asymptote of the sigmoid (firing rate asx → +∞).midpoint (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Half-activation potential (centre of the sigmoid).r (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Steepness of the sigmoid.
- Returns:
Coupling output with shape
(..., N_out).σ_JRis dimensionless, so the output carries the units ofk * conn.- Return type:
ArrayLike
See also
sigmoidal_couplingpost-nonlinearity (sigmoid after the sum).
brainmass.JansenRitStepthe Jansen-Rit neural mass whose output this couples.
Notes
The sigmoid argument must be dimensionless; the source is reduced to its magnitude (
brainunit.get_magnitude) before the nonlinearity. Atx = midpointthe transfer equals(cmin + cmax) / 2, soc_i = k * (cmin + cmax) / 2 * Σ_j w_ij; far below/abovemidpointit tends tocmin/cmaxrespectively.References
Examples
>>> import brainmass >>> import jax.numpy as jnp >>> conn = jnp.array([[0.2, 0.3], [0.5, 0.1]]) >>> x = jnp.full((2, 2), 6.0) # at the midpoint -> sigma = (cmin + cmax) / 2 >>> out = brainmass.sigmoidal_jansen_rit_coupling(x, conn, k=1.0) >>> [round(float(v), 6) for v in out] [0.00125, 0.0015]