spike

package
v2.0.0-dev0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActParams

type ActParams struct {
	leabra.ActParams

	// spiking parameters
	Spike SpikeParams `display:"inline"`
}

ActParams is full set of activation params including those from base leabra and the additional Spiking-specific ones.

func (*ActParams) CopyFromAct

func (sk *ActParams) CopyFromAct(act *leabra.ActParams)

CopyFromAct copies ActParams from source (e.g., rate-code params)

func (*ActParams) Defaults

func (sk *ActParams) Defaults()

func (*ActParams) SpikeActFromVm

func (sk *ActParams) SpikeActFromVm(nrn *leabra.Neuron)

SpikeActFromVm computes the discrete spiking activation from membrane potential Vm

func (*ActParams) SpikeVmFromG

func (sk *ActParams) SpikeVmFromG(nrn *leabra.Neuron)

func (*ActParams) Update

func (sk *ActParams) Update()

type SpikeParams

type SpikeParams struct {

	// if true, turn on exponential excitatory current that drives Vm rapidly upward for spiking as it gets past its nominal firing threshold (Thr) -- nicely captures the Hodgkin Huxley dynamics of Na and K channels -- uses Brette & Gurstner 2005 AdEx formulation -- this mechanism has an unfortunate interaction with the continuous inhibitory currents generated by the standard FFFB inhibitory function, which cause this mechanism to desensitize and fail to spike
	Exp bool `default:"false"`

	// slope in Vm (2 mV = .02 in normalized units) for extra exponential excitatory current that drives Vm rapidly upward for spiking as it gets past its nominal firing threshold (Thr) -- nicely captures the Hodgkin Huxley dynamics of Na and K channels -- uses Brette & Gurstner 2005 AdEx formulation -- a value of 0 disables this mechanism
	ExpSlope float32 `default:"0.02"`

	// membrane potential threshold for actually triggering a spike when using the exponential mechanism
	ExpThr float32 `default:"1.2"`

	// post-spiking membrane potential to reset to, produces refractory effect if lower than VmInit -- 0.30 is appropriate biologically based value for AdEx (Brette & Gurstner, 2005) parameters
	VmR float32 `default:"0.3,0,0.15"`

	// post-spiking explicit refractory period, in cycles -- prevents Vm updating for this number of cycles post firing
	Tr int `default:"3"`

	// for translating spiking interval (rate) into rate-code activation equivalent (and vice-versa, for clamped layers), what is the maximum firing rate associated with a maximum activation value (max act is typically 1.0 -- depends on act_range)
	MaxHz float32 `default:"180" min:"1"`

	// constant for integrating the spiking interval in estimating spiking rate
	RateTau float32 `default:"5" min:"1"`

	// rate = 1 / tau
	RateDt float32 `display:"-"`
}

SpikeParams contains spiking activation function params. Implements the AdEx adaptive exponential function

func (*SpikeParams) ActFromISI

func (sk *SpikeParams) ActFromISI(isi, timeInc, integ float32) float32

ActFromISI computes rate-code activation from estimated spiking interval

func (*SpikeParams) ActToISI

func (sk *SpikeParams) ActToISI(act, timeInc, integ float32) float32

ActToISI compute spiking interval from a given rate-coded activation, based on time increment (.001 = 1msec default), Act.Dt.Integ

func (*SpikeParams) AvgFromISI

func (sk *SpikeParams) AvgFromISI(avg *float32, isi float32)

AvgFromISI updates spiking ISI from current isi interval value

func (*SpikeParams) Defaults

func (sk *SpikeParams) Defaults()

func (*SpikeParams) ShouldDisplay

func (sk *SpikeParams) ShouldDisplay(field string) bool

func (*SpikeParams) Update

func (sk *SpikeParams) Update()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL