Neuron Models¶
Copyright 2015 by Johannes Leugering (jleugeri@uos.de)
This file is part of the adaptive LN Neurons package.
The adaptive LN Neurons package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this package in files named COPYING and COPYING.LESSER. If not, see <http://www.gnu.org/licenses/>.
-
class
nengo_adaptiveLN_models.neurons.AdaptiveLN(tau_adapt=1000.0, position=array([ 0.]), scale=array([ 0.]))¶ Base class for adaptive linear-non-linear (LN) neuron models that maps to various output distributions defined by subclasses
Note
properties of adaptive LN neurons which can be probed include:
rates: the rate output of the neuron mu_in: the estimated mean (1st sufficient statistic) of the normal input sq_in: the estimated mean of squares (2nd sufficient statistic) of the normal input Parameters: - tau_adapt (scalar) – time-constant of the adaptation variables (in ms)
- scale (ndarry(dtype=float)) – a scale parameter (typically multiplicative, depending on the output distribution)
- position – a position parameter (typically additive, depending on the output distribution)
-
gain_bias(*args, **kwargs)¶ Not implemented.
Warning
This function is only called if the network is set up incorrectly. The gain and bias variables should be set to ones and zeros, respectively, when creating an ensemble.
Use the bias and gain keyword arguments of
nengo.Ensemble()to set them manually!
-
nonlinearity(whitened_J)¶ Not implemented. Must be defined by subclasses.
-
rates(x, scale, position)¶ Calculate firing rate of differently tuned neurons in response to inputs.
Parameters: - x (ndarry(dtype=float)) – input(s) to the neurons
- scale (ndarry(dtype=float)) – a scale parameter (typically multiplicative, depending on the output distribution); currenty ignored
- position – a position parameter (typically additive, depending on the output distribution); currenty ignored
Warning
The scale and position parameters given as arguments corresponding to gain and bias in
nengodon’t yet behave as desired and should thus be set to ones and zeros, respectively.
-
step_math(dt, J, output, mu_in, sq_in)¶ Compute firing rates (in Hz).
Parameters: - dt (scalar) – step-size of numerical simulation (in ms)
- J (ndarray(dtype=float)) – inputs
- output (ndarry(dtype=float)) – array in which to story the resulting outputs
- mu_in (ndarray(dtype=float)) – the estimated mean (1st sufficient statistic) of the normal input
- sq_in – the estimated mean of squares (2nd sufficient statistic) of the normal input
-
class
nengo_adaptiveLN_models.neurons.AdaptiveLNuniform(tau_adapt=1000.0, position=array([ 0.]), scale=array([ 0.]))¶ Adaptive LN neuron model that maps to uniformly distributed outputs
Note
properties of adaptive LN neurons which can be probed include:
rates: the rate output of the neuron mu_in: the estimated mean (1st sufficient statistic) of the normal input sq_in: the estimated mean of squares (2nd sufficient statistic) of the normal input Parameters: - tau_adapt (scalar) – time-constant of the adaptation variables (in ms)
- scale (ndarry(dtype=float)) – a scale parameter (typically multiplicative, depending on the output distribution)
- position – a position parameter (typically additive, depending on the output distribution)
-
nonlinearity(whitened)¶ Calculates the nonlinearity for a mapping from standard normal inputs to uniform outputs
Parameters: whitened – whitened input to the neurons’ nonlinearity Return type: ndarray(dtype=float)
-
class
nengo_adaptiveLN_models.neurons.AdaptiveLNlogNormal(cutoff=100.0, **kwargs)¶ Adaptive LN neuron model that maps to log-normally distributed outputs
Note
properties of adaptive LN neurons which can be probed include:
rates: the rate output of the neuron mu_in: the estimated mean (1st sufficient statistic) of the normal input sq_in: the estimated mean of squares (2nd sufficient statistic) of the normal input Parameters: - tau_adapt (scalar) – time-constant of the adaptation variables (in ms)
- scale (ndarry(dtype=float)) – a scale parameter (typically multiplicative, depending on the output distribution)
- position – a position parameter (typically additive, depending on the output distribution)
- cutoff (scalar) – maximum attainable firing rate at which the exponential output is cut off
-
nonlinearity(whitened)¶ Calculates the nonlinearity for a mapping from standard normal inputs to log-normal outputs.
Parameters: whitened – whitened input to the neurons’ nonlinearity Return type: ndarray(dtype=float)