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

Class DivisiveNormalizeL1

source code

                                  object --+        
                                           |        
base.parameterizedobject.ParameterizedObject --+    
                                               |    
                  base.functionfamilies.OutputFn --+
                                                   |
                                                  DivisiveNormalizeL1

OutputFn 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 base.parameterizedobject.ParameterizedObject: __metaclass__

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

Inherited from base.functionfamilies.OutputFn: __add__

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __init__, __repr__, __setstate__, __str__, as_uninitialized, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, verbose, warning

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

Class Methods [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: params, print_param_defaults

Class Variables [hide private]
  norm_value = <topo.base.parameterclasses.Number object at 0x9d...

Inherited from base.parameterizedobject.ParameterizedObject: name, 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.functionfamilies.OutputFn.__call__

Class Variable Details [hide private]

norm_value

Value:
Number(default= 1.0)