Package topo :: Package analysis :: Module featureresponses :: Class PatternPresenter
[hide private]
[frames] | no frames]

Class PatternPresenter

source code


Function object for presenting PatternGenerator-created patterns.

This class helps coordinate a set of patterns to be presented to a set of GeneratorSheets. It provides a standardized way of generating a set of linked patterns for testing or analysis, such as when measuring preference maps or presenting test patterns. Subclasses can provide additional mechanisms for doing this in different ways.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, pattern_generator, **params)
pattern_generator is the PatternGenerator that will be drawn on the generator_sheets (the parameters of the pattern_generator are specified during calls.
source code
 
__call__(self, features_values, param_dict) source code

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, 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]
  contrast_parameter = param.Parameter('michelson_contrast')
  divisions = param.Parameter()
  apply_output_fns = param.Boolean(default= True, doc= ...
When presenting a pattern, whether to apply each sheet's output function.
  duration = param.Number(default= 1.0, doc= ...
Amount of simulation time for which to present each test pattern.
  generator_sheets = param.List(default= [], doc= ...
The set of GeneratorSheets onto which patterns will be drawn.
  __params = {'apply_output_fns': <param.Boolean object at 0xb20...
dict() -> new empty dictionary.
  name = <param.parameterized.String object at 0xb205c2c>
String identifier for this object.

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pattern_generator, **params)
(Constructor)

source code 
pattern_generator is the PatternGenerator that will be drawn on the generator_sheets (the parameters of the pattern_generator are specified during calls.
Overrides: object.__init__

Class Variable Details [hide private]

apply_output_fns

When presenting a pattern, whether to apply each sheet's output function. If False, for many networks the response will be linear, which requires fewer test patterns to measure a meaningful response, but it may not correspond to the actual preferences of each neuron under other conditions. If True, callers will need to ensure that the input patterns are in a suitable range to drive the neurons to generate meaningful output, because e.g. a threshold-based output function might result in no activity for inputs that are too weak..
Value:
param.Boolean(default= True, doc= """
        When presenting a pattern, whether to apply each sheet's
        output function.  If False, for many networks the response
        will be linear, which requires fewer test patterns to measure
        a meaningful response, but it may not correspond to the actual
        preferences of each neuron under other conditions.  If True,
        callers will need to ensure that the input patterns are in a
        suitable range to drive the neurons to generate meaningful
...

duration

Amount of simulation time for which to present each test pattern. By convention, most Topographica example files are designed to have a suitable activity pattern computed by the default time, but the duration will need to be changed for other models that do not follow that convention or if a linear response is desired.
Value:
param.Number(default= 1.0, doc= """
        Amount of simulation time for which to present each test pattern.
        By convention, most Topographica example files are designed to
        have a suitable activity pattern computed by the
        default time, but the duration will need to be changed for
        other models that do not follow that convention or if a
        linear response is desired.""")

generator_sheets

The set of GeneratorSheets onto which patterns will be drawn.

By default (i.e. for an empty list), all GeneratorSheets in the simulation will be used.

Value:
param.List(default= [], doc= """
        The set of GeneratorSheets onto which patterns will be drawn.
        
        By default (i.e. for an empty list), all GeneratorSheets in
        the simulation will be used.
        """)

__params

dict() -> new empty dictionary.
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs.
dict(seq) -> new dictionary initialized as if via:
    d = {}
    for k, v in seq:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

Value:
{'apply_output_fns': <param.Boolean object at 0xb2055ac>,
 'contrast_parameter': <param.parameterized.Parameter object at 0xb316ae4>,
 'divisions': <param.parameterized.Parameter object at 0xb316b1c>,
 'duration': <param.Number object at 0xb30fe84>,
 'generator_sheets': <param.List object at 0xb205a6c>,
 'name': <param.parameterized.String object at 0xb205c2c>,
 'print_level': <param.parameterized.Parameter object at 0xa30387c>}