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

Class ActivityAveragingTF

source code


Calculates the average of the input activity.

The average is calculated as an exponential moving average, where the weighting for each older data point decreases exponentially. The degree of weighing for the previous values is expressed as a constant smoothing factor.

The plastic parameter allows the updating of the average values to be disabled temporarily, e.g. while presenting test patterns.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, x) source code

Inherited from TransferFnWithState: override_plasticity_state, restore_plasticity_state, state_pop, state_push

Inherited from param.parameterized.Parameterized: __getstate__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_default, set_dynamic_time_fn, set_param, verbose, warning

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  step = param.Number(default= 1, doc= ...
How often to update the average.
  smoothing = param.Number(default= 0.9997, doc= ...
The degree of weighting for the previous average, when calculating the new average.
  initial_average = param.Number(default= 0, doc= "Starting valu...
Starting value for the average activity.
  name = <param.parameterized.String object at 0xb58972c>
String identifier for this object.

Inherited from TransferFnWithState: plastic

Inherited from base.functionfamily.TransferFn: norm_value

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **params)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__call__(self, x)
(Call operator)

source code 
Overrides: base.functionfamily.TransferFn.__call__

Class Variable Details [hide private]

step

How often to update the average.

For instance, step=1 means to update it every time this OF is called; step=2 means to update it every other time.

Value:
param.Number(default= 1, doc= """
        How often to update the average.

        For instance, step=1 means to update it every time this OF is
        called; step=2 means to update it every other time.""")

smoothing

The degree of weighting for the previous average, when calculating the new average.
Value:
param.Number(default= 0.9997, doc= """
        The degree of weighting for the previous average, when calculating the new\
 average.""")

initial_average

Starting value for the average activity.
Value:
param.Number(default= 0, doc= "Starting value for the average activity.")