Package topo :: Package transferfn :: Module basic
[hide private]
[frames] | no frames]

Module basic

source code

Simple functions operating on a matrix, potentially modifying it.

These are useful for neuron output functions, normalization of matrices, etc.

All of these function objects (callable objects) should work for Numpy array arguments of arbitrary shape. Some may also work for scalars.

$Id: basic.py 11108 2010-07-05 10:27:54Z ceball $


Version: $Revision: 11108 $

Classes [hide private]
  TransferFn
Function object to modify a matrix in place, e.g.
  IdentityTF
Identity function, returning its argument as-is.
  PiecewiseLinear
Piecewise-linear TransferFn with lower and upper thresholds.
  Sigmoid
Sigmoidal (logistic) transfer function: 1/(1+exp-(r*x+k)).
  NakaRushton
Naka-Rushton curve.
  GeneralizedLogistic
The generalized logistic curve (Richards' curve): y = l + (u /(1 + b * exp(-r*(x-2*m))^(1/b))).
  DivisiveNormalizeL1
TransferFn that divides an array by its L1 norm.
  DivisiveNormalizeL2
TransferFn to divide an array by its Euclidean length (aka its L2 norm).
  DivisiveNormalizeLinf
TransferFn to divide an array by its L-infinity norm (i.e.
  DivisiveNormalizeLp
TransferFn to divide an array by its Lp-Norm, where p is specified.
  HalfRectifyAndSquare
Transfer function that applies a half-wave rectification (clips at zero) and then squares the values.
  HalfRectifyAndPower
Transfer function that applies a half-wave rectification (i.e., clips at zero), and then raises the result to the e-th power (where the exponent e can be selected arbitrarily).
  ExpLinear
Transfer function that is exponential until t from which point it is linear.
  Square
Transfer function that applies a squaring nonlinearity.
  BinaryThreshold
Forces all values below a threshold to zero, and above it to 1.0.
  Threshold
Forces all values below a threshold to zero, and leaves others unchanged.
  TransferFnWithState
Abstract base class for TransferFns that need to maintain a self.plastic parameter.
  TransferFnWithRandomState
Abstract base class for TransferFns that use a random number generator.
  PoissonSample
Simulate Poisson-distributed activity with specified mean values.
  ActivityAveragingTF
Calculates the average of the input activity.
  HomeostaticMaxEnt
Implementation of homeostatic intrinsic plasticity from Jochen Triesch, ICANN 2005, LNCS 3696 pp.65-70.
  ScalingTF
Scales input activity based on the current average activity (x_avg).
  Hysteresis
Smoothly interpolates a matrix between simulation time steps, with exponential falloff.
Variables [hide private]
  exp = <ufunc 'exp'>
  power = <ufunc 'power'>
  __package__ = 'topo.transferfn'
  k = 'activity_type'