Threshold Models
The following threshold models are supported:
- Ideal
- Inhomogenous Poisson process
Ideal
SpikingNN.Threshold.Ideal
— TypeIdeal(vth::Real)
An ideal threshold spikes when v > vth
.
SpikingNN.evaluate!
— Methodevaluate!(threshold::Ideal, t::Real, v::Real; dt::Real = 1.0)
(threshold::Ideal)(t::Real, v::Real; dt::Real = 1.0)
evaluate!(thresholds::AbstractArray{<:Ideal}, t::Integer, v; dt::Real = 1.0)
Return t
when v > threshold.vth
.
Inhomogenous Poisson Process
SpikingNN.Threshold.Poisson
— TypePoisson(ρ₀::Real, Θ::Real, Δᵤ::Real, rng::AbstractRNG)
Choose to output a spike based on a inhomogenous Poisson process given by
$X < \mathrm{d}t \: \rho_0 \exp\left(\frac{v - \Theta}{\Delta_u}\right)$
where $X \sim \mathrm{Unif}([0, 1])$. Accordingly, dt
must be set correctly so that the neuron does not always spike.
Fields:
ρ₀::Real
: baseline firing rate at thresholdΘ::Real
: firing thresholdΔᵤ::Real
: voltage resolutionrng
: random number generation
SpikingNN.evaluate!
— Methodevaluate!(threshold::Poisson, t::Integer, v::Real; dt::Real = 1.0)
(::Poisson)(t::Integer, v::Real; dt::Real = 1.0)
evaluate!(thresholds::AbstractArray{<:Poisson}, t::Integer, v; dt::Real = 1.0)
Evaluate Poisson threshold function. See Threshold.Poisson
.