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

Class KernelMax

source code

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

Replaces the given matrix with a kernel function centered around the maximum value.

This operation is usually part of the Kohonen SOM algorithm, and approximates a series of lateral interactions resulting in a single activity bubble.

The radius of the kernel (i.e. the surround) is specified by the parameter 'radius', which should be set before using __call__. The shape of the surround is determined by the neighborhood_kernel_generator, and can be any PatternGenerator instance, or any function accepting bounds, density, radius, and height to return a kernel matrix.



Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
__call__(self, x) 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]
  kernel_radius = <topo.base.parameterclasses.Number object at 0...
Kernel radius in Sheet coordinates.
  neighborhood_kernel_generator = <topo.base.parameterclasses.Cl...
Neighborhood function
  crop_radius_multiplier = <topo.base.parameterclasses.Number ob...
Factor by which the radius should be multiplied, when deciding how far from the winner to keep evaluating the kernel.
  density = Number(1.0, bounds= (0, None), doc= ...
Density of the Sheet whose matrix we act on, for use in converting from matrix to Sheet coordinates.

Inherited from base.functionfamilies.OutputFn: norm_value

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 
Overrides: base.functionfamilies.OutputFn.__call__

Class Variable Details [hide private]

kernel_radius

Kernel radius in Sheet coordinates.
Value:
Number(default= 0.0, bounds= (0, None), doc= """
        Kernel radius in Sheet coordinates.""")

neighborhood_kernel_generator

Neighborhood function
Value:
ClassSelectorParameter(PatternGenerator, default= Gaussian(x= 0.0, y= 0.0, aspect_\
ratio= 1.0), doc= "Neighborhood function")

crop_radius_multiplier

Factor by which the radius should be multiplied, when deciding how far from the winner to keep evaluating the kernel.
Value:
Number(default= 3.0, doc= """        
        Factor by which the radius should be multiplied, when deciding
        how far from the winner to keep evaluating the kernel.""")

density

Density of the Sheet whose matrix we act on, for use in converting from matrix to Sheet coordinates.
Value:
Number(1.0, bounds= (0, None), doc= """
        Density of the Sheet whose matrix we act on, for use
        in converting from matrix to Sheet coordinates.""")