Package topo :: Package outputfn :: 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 9369 2008-10-03 12:15:13Z judelaw $


Version: $Revision: 9369 $

Classes [hide private]
  OutputFn
Function object to modify a matrix in place, e.g.
  IdentityOF
Identity function, returning its argument as-is.
  PipelineOF
Applies a list of other OutputFns in order, to combine their effects.
  Pipeline
Applies a list of other OutputFns in order, to combine their effects.
  PiecewiseLinear
Piecewise-linear OutputFn with lower and upper thresholds.
  Sigmoid
Sigmoidal (logistic) output 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
OutputFn that divides an array by its L1 norm.
  DivisiveNormalizeL2
OutputFn to divide an array by its Euclidean length (aka its L2 norm).
  DivisiveNormalizeLinf
OutputFn to divide an array by its L-infinity norm (i.e.
  DivisiveNormalizeLp
OutputFn to divide an array by its Lp-Norm, where p is specified.
  HalfRectifyAndSquare
Output function that applies a half-wave rectification (clips at zero) and then squares the values.
  HalfRectifyAndPower
Output 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).
  HalfRectify
Output function that applies a half-wave rectification (clips at zero)
  Square
Output function that applies a squaring nonlinearity.
  BinaryThreshold
Forces all values below a threshold to zero, and above it to 1.0.
  PatternCombine
Combine the supplied pattern with one generated using a PatternGenerator.
  KernelMax
Replaces the given matrix with a kernel function centered around the maximum value.
  OutputFnWithState
Abstract base class for OutputFns that need to maintain a self.plastic parameter.
  OutputFnWithRandomState
Abstract base class for OutputFns that use a random number generator.
  PoissonSample
Simulate Poisson-distributed activity with specified mean values.
  AttributeTrackingOF
Keeps track of attributes of a specified Parameterized over time, for analysis or plotting.
  ActivityAveragingOF
Calculates the average of the input activity.
  HomeostaticMaxEnt
Implementation of homeostatic intrinsic plasticity from Jochen Triesch, ICANN 2005, LNCS 3696 pp.65-70.
  ScalingOF
Scales input activity based on the current average activity (x_avg).
Variables [hide private]
  exp = <ufunc 'exp'>
  power = <ufunc 'power'>
  activity_type = 'd'
  k = 'activity_type'
  v = 'd'