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

Class DivisiveNormalizeL1

source code


TransferFn that divides an array by its L1 norm.

This operation ensures that the sum of the absolute values of the array is equal to the specified norm_value, rescaling each value to make this true. The array is unchanged if the sum of absolute values is zero. For arrays of non-negative values where at least one is non-zero, this operation is equivalent to a divisive sum normalization.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__call__(self, x)
L1-normalize the input array, if it has a nonzero sum.
source code

Inherited from param.parameterized.Parameterized: __getstate__, __init__, __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, state_pop, state_push, 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]
  norm_value = param.Number(default= 1.0)
  name = <param.parameterized.String object at 0xb58936c>
String identifier for this object.

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 
L1-normalize the input array, if it has a nonzero sum.
Overrides: base.functionfamily.TransferFn.__call__