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

Class PoissonSample

source code


Simulate Poisson-distributed activity with specified mean values.

This transfer function interprets each matrix value as the (potentially scaled) rate of a Poisson process and replaces it with a sample from the appropriate Poisson distribution.

To allow the matrix to contain values in a suitable range (such as [0.0,1.0]), the input matrix is scaled by the parameter in_scale, and the baseline_rate is added before sampling. After sampling, the output value is then scaled by out_scale. The function thus performs this transformation:

x <- P(in_scale * x + baseline_rate) * out_scale

where x is a matrix value and P(r) samples from a Poisson distribution with rate r.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__call__(self, x) source code

Inherited from TransferFnWithRandomState: __init__, state_pop, state_push

Inherited from TransferFnWithState: override_plasticity_state, restore_plasticity_state

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]
  in_scale = param.Number(default= 1.0, doc= ...
Amount by which to scale the input.
  baseline_rate = param.Number(default= 0.0, doc= ...
Constant to add to the input after scaling, resulting in a baseline Poisson process rate.
  out_scale = param.Number(default= 1.0, doc= ...
Amount by which to scale the output (e.g.
  name = <param.parameterized.String object at 0xb5896ec>
String identifier for this object.

Inherited from TransferFnWithRandomState: random_generator

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]

__call__(self, x)
(Call operator)

source code 
Overrides: base.functionfamily.TransferFn.__call__

Class Variable Details [hide private]

in_scale

Amount by which to scale the input.
Value:
param.Number(default= 1.0, doc= """
       Amount by which to scale the input.""")

baseline_rate

Constant to add to the input after scaling, resulting in a baseline Poisson process rate.
Value:
param.Number(default= 0.0, doc= """
       Constant to add to the input after scaling, resulting in a baseline
       Poisson process rate.""")

out_scale

Amount by which to scale the output (e.g. 1.0/in_scale).
Value:
param.Number(default= 1.0, doc= """
       Amount by which to scale the output (e.g. 1.0/in_scale).""")