Documentation ¶
Overview ¶
Package nxx1 provides the Noisy-X-over-X-plus-1 activation function that well-characterizes the neural response function empirically, as a saturating sigmoid-like nonlinear response with an initial largely-linear regime.
The basic x/(x+1) sigmoid function is convolved with a gaussian noise kernel to produce a better approximation of the effects of noise on neural firing -- the main effect is to create a continuous graded early level of firing even slightly below threshold, softening the otherwise hard transition to firing at threshold.
A hand-optimized piece-wise function approximation is used to generate the NXX1 function instead of requiring a lookup table of the gaussian convolution. This is much easier to use across a range of computational platforms including GPU's, and produces very similar overall values.
Index ¶
- type Params
- func (xp *Params) Defaults()
- func (xp *Params) NoisyXX1(x float32) float32
- func (xp *Params) NoisyXX1Gain(x, gain float32) float32
- func (xp *Params) Update()
- func (xp *Params) XX1(x float32) float32
- func (xp *Params) XX1GainCor(x float32) float32
- func (xp *Params) XX1GainCorGain(x, gain float32) float32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct { Thr float32 `` /* 152-byte string literal not displayed */ Gain float32 `` /* 305-byte string literal not displayed */ NVar float32 `` /* 372-byte string literal not displayed */ VmActThr float32 `` /* 182-byte string literal not displayed */ SigMult float32 `def:"0.33" view:"-" json:"-" xml:"-" desc:"multiplier on sigmoid used for computing values for net < thr"` SigMultPow float32 `def:"0.8" view:"-" json:"-" xml:"-" desc:"power for computing sig_mult_eff as function of gain * nvar"` SigGain float32 `def:"3" view:"-" json:"-" xml:"-" desc:"gain multipler on (net - thr) for sigmoid used for computing values for net < thr"` InterpRange float32 `def:"0.01" view:"-" json:"-" xml:"-" desc:"interpolation range above zero to use interpolation"` GainCorRange float32 `` /* 130-byte string literal not displayed */ GainCor float32 `def:"0.1" view:"-" json:"-" xml:"-" desc:"gain correction multiplier -- how much to correct gains"` SigGainNVar float32 `view:"-" json:"-" xml:"-" desc:"sig_gain / nvar"` SigMultEff float32 `` /* 145-byte string literal not displayed */ SigValAt0 float32 `view:"-" json:"-" xml:"-" desc:"0.5 * sig_mult_eff -- used for interpolation portion"` InterpVal float32 `view:"-" json:"-" xml:"-" desc:"function value at interp_range - sig_val_at_0 -- for interpolation"` }
Params are the Noisy X/(X+1) rate-coded activation function parameters. This function well-characterizes the neural response function empirically, as a saturating sigmoid-like nonlinear response with an initial largely-linear regime. The basic x/(x+1) sigmoid function is convolved with a gaussian noise kernel to produce a better approximation of the effects of noise on neural firing -- the main effect is to create a continuous graded early level of firing even slightly below threshold, softening the otherwise hard transition to firing at threshold. A hand-optimized piece-wise function approximation is used to generate the NXX1 function instead of requiring a lookup table of the gaussian convolution. This is much easier to use across a range of computational platforms including GPU's, and produces very similar overall values. abc.
func (*Params) NoisyXX1 ¶
NoisyXX1 computes the Noisy x/(x+1) function -- directly computes close approximation to x/(x+1) convolved with a gaussian noise function with variance nvar. No need for a lookup table -- very reasonable approximation for standard range of parameters (nvar = .01 or less -- higher values of nvar are less accurate with large gains, but ok for lower gains)
func (*Params) NoisyXX1Gain ¶
NoisyXX1Gain computes the noisy x/(x+1) function -- directly computes close approximation to x/(x+1) convolved with a gaussian noise function with variance nvar. No need for a lookup table -- very reasonable approximation for standard range of parameters (nvar = .01 or less -- higher values of nvar are less accurate with large gains, but ok for lower gains). Using external gain factor.
func (*Params) XX1GainCor ¶
XX1GainCor computes x/(x+1) with gain correction within GainCorRange to compensate for convolution effects
func (*Params) XX1GainCorGain ¶
X11GainCorGain computes x/(x+1) with gain correction within GainCorRange to compensate for convolution effects -- using external gain factor