ngclearn.components.other package

Submodules

ngclearn.components.other.expKernel module

class ngclearn.components.other.expKernel.ExpKernel(*args: Any, **kwargs: Any)[source]

Bases: Component

A spiking function based on an exponential kernel applied to a moving window of spike times.

Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • nu – (ms, spike time interval for window)

  • tau_w – spike window time constant (in micro-secs, or nano-s)

  • key – PRNG key to control determinism of any underlying random values associated with this cell

  • useVerboseDict – triggers slower, verbose dictionary mode (Default: False)

  • directory – string indicating directory on disk to save sLIF parameter values to (i.e., initial threshold values and any persistent adaptive threshold values)

advance_state(t, dt, **kwargs)[source]
property epsp
property inputCompartment
classmethod inputCompartmentName()[source]
classmethod outputCompartmentName()[source]
reset(**kwargs)[source]
save(**kwargs)[source]
verify_connections()[source]
ngclearn.components.other.expKernel.apply_kernel(tf_curr, s, t, tau_w, win_len, krn_start, krn_end)

ngclearn.components.other.varTrace module

class ngclearn.components.other.varTrace.VarTrace(*args: Any, **kwargs: Any)[source]

Bases: Component

A variable trace (filter) functional node.

Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • tau_tr – trace time constant (in milliseconds, or ms)

  • a_delta – value to increment a trace by in presence of a spike; note if set to a value <= 0, then a piecewise gated trace will be used instead

  • decay_type

    string indicating the decay type to be applied to ODE integration; low-pass filter configuration

    Note:

    string values that this can be (Default: “exp”) are: 1) ‘lin’ = linear trace filter, i.e., decay = x_tr + (-x_tr) * (dt/tau_tr); 2) ‘exp’ = exponential trace filter, i.e., decay = exp(-dt/tau_tr) * x_tr; 3) ‘step’ = step trace, i.e., decay = 0 (a pulse applied upon input value)

  • key – PRNG key to control determinism of any underlying random values associated with this cell

  • useVerboseDict – triggers slower, verbose dictionary mode (Default: False)

  • directory – string indicating directory on disk to save sLIF parameter values to (i.e., initial threshold values and any persistent adaptive threshold values)

advance_state(t, dt, **kwargs)[source]
property inputCompartment
classmethod inputCompartmentName()[source]
classmethod outputCompartmentName()[source]
reset(**kwargs)[source]
save(**kwargs)[source]
property trace
classmethod traceName()[source]
verify_connections()[source]
ngclearn.components.other.varTrace.run_varfilter(dt, x, x_tr, decayFactor, a_delta=0.0)

Run variable trace filter (low-pass filter) dynamics one step forward.

Parameters:
  • dt – integration time constant (ms)

  • x – variable value / stimulus input (at t)

  • x_tr – currenet value of trace/filter

  • decayFactor – coefficient to decay trace by before application of new value

  • a_delta – increment to made to filter (multiplied w/ stimulus x)

Returns:

updated trace/filter value/state

Module contents