Package topo :: Package base :: Module sheet :: Class Sheet
[hide private]
[frames] | no frames]

Class Sheet

source code

                       object --+        
                                |        
param.parameterized.Parameterized --+    
                                    |    
            simulation.EventProcessor --+
                                        |
                           object --+   |
                                    |   |
    sheetcoords.SheetCoordinateSystem --+
                                        |
                                       Sheet
Known Subclasses:

The generic base class for neural sheets.

See SheetCoordinateSystem for how Sheet represents space, and EventProcessor for how Sheet handles time.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params)
Initialize this object as an EventProcessor, then also as a SheetCoordinateSystem with equal xdensity and ydensity.
source code
 
_get_density(self) source code
 
activity_len(self)
Return the number of items that have been saved by state_push().
source code
 
override_plasticity_state(self, new_plasticity_state)
Temporarily override plasticity of medium and long term internal state.
source code
 
release_sheet_view(self, view_name)
Delete the dictionary entry with key entry 'view_name' to save memory.
source code
 
restore_plasticity_state(self)
Restores plasticity of medium and long term internal state after a override_plasticity_state call.
source code
 
row_col_sheetcoords(self)
Return an array of Y-coordinates corresponding to the rows of the activity matrix of the sheet, and an array of X-coordinates corresponding to the columns.
source code
 
sheet_cols(self) source code
 
sheet_offset(self)
Return the offset of the sheet origin from the lower-left corner of the sheet, in sheet coordinates.
source code
 
sheet_rows(self) source code
 
state_pop(self)
Pop the most recently saved state off the stack.
source code
 
state_push(self)
Save the current state of this sheet to an internal stack.
source code

Inherited from simulation.EventProcessor: input_event, process_current_time, script_repr, send_output, start

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, set_dynamic_time_fn, verbose, warning

Inherited from sheetcoords.SheetCoordinateSystem: closest_cell_center, matrix2sheet, matrixidx2sheet, sheet2matrix, sheet2matrixidx, sheetcoordinates_of_matrixidx

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  __abstract = True
bool(x) -> bool
  layout_location = param.NumericTuple(default= (-1,-1), precede...
Location for this Sheet in an arbitrary pixel-based space in which Sheets can be laid out for visualization.
  nominal_bounds = BoundingRegionParameter(BoundingBox(radius= 0...
User-specified BoundingBox of the Sheet coordinate area covered by this Sheet.
  nominal_density = param.Number(default= 10, constant= True, do...
User-specified number of processing units per 1.0 distance horizontally or vertically in Sheet coordinates.
  plastic = param.Boolean(True, doc= ...
Setting this to False tells the Sheet not to change its permanent state (e.g.
  precedence = param.Number(default= 0.1, softbounds= (0.0, 1.0)...
Allows a sorting order for Sheets, e.g.

Inherited from simulation.EventProcessor: dest_ports, src_ports

Inherited from param.parameterized.Parameterized: name, print_level

Properties [hide private]
  density
The sheet's true density (i.e.

Inherited from sheetcoords.SheetCoordinateSystem: shape, xdensity, ydensity

Inherited from object: __class__

Method Details [hide private]

__init__(self, **params)
(Constructor)

source code 

Initialize this object as an EventProcessor, then also as a SheetCoordinateSystem with equal xdensity and ydensity.

sheet_views is a dictionary that stores SheetViews, i.e. representations of the sheet for use by analysis or plotting code.

Overrides: object.__init__

override_plasticity_state(self, new_plasticity_state)

source code 

Temporarily override plasticity of medium and long term internal state.

This function should be implemented by all subclasses so that it preserves the ability of the Sheet to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state (if new_plasticity_state=False).

Any operation that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.

By default, simply saves a copy of the plastic flag to an internal stack (so that it can be restored by restore_plasticity_state()), and then sets plastic to new_plasticity_state.

restore_plasticity_state(self)

source code 

Restores plasticity of medium and long term internal state after a override_plasticity_state call.

This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, i.e. to restore plasticity of any type that was overridden.

state_pop(self)

source code 

Pop the most recently saved state off the stack.

See state_push() for more details.

Overrides: param.parameterized.Parameterized.state_pop

state_push(self)

source code 

Save the current state of this sheet to an internal stack.

This method is used by operations that need to test the response of the sheet without permanently altering its state, e.g. for measuring maps or probing the current behavior non-invasively. By default, only the activity pattern of this sheet is saved, but subclasses should add saving for any additional state that they maintain, or strange bugs are likely to occur. The state can be restored using state_pop().

Note that Sheets that do learning need not save the values of all connection weights, if any, because plasticity can be turned off explicitly. Thus this method is intended only for shorter-term state.

Overrides: param.parameterized.Parameterized.state_push

Class Variable Details [hide private]

__abstract

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

Value:
True

layout_location

Location for this Sheet in an arbitrary pixel-based space in which Sheets can be laid out for visualization.
Value:
param.NumericTuple(default= (-1,-1), precedence=-1, doc= """
            Location for this Sheet in an arbitrary pixel-based space
            in which Sheets can be laid out for visualization.""")

nominal_bounds

User-specified BoundingBox of the Sheet coordinate area covered by this Sheet. The left and right bounds--if specified--will always be observed, but the top and bottom bounds may be adjusted to ensure the density in the y direction is the same as the density in the x direction. In such a case, the top and bottom bounds are adjusted so that the center y point remains the same, and each bound is as close as possible to its specified value. The actual value of this Parameter is not adjusted, but the true bounds may be found from the 'bounds' attribute of this object.
Value:
BoundingRegionParameter(BoundingBox(radius= 0.5), constant= True, doc= """
            User-specified BoundingBox of the Sheet coordinate area
            covered by this Sheet.  The left and right bounds--if
            specified--will always be observed, but the top and bottom
            bounds may be adjusted to ensure the density in the y
            direction is the same as the density in the x direction.
            In such a case, the top and bottom bounds are adjusted
            so that the center y point remains the same, and each
...

nominal_density

User-specified number of processing units per 1.0 distance horizontally or vertically in Sheet coordinates. The actual number may be different because of discretization; the matrix needs to tile the plane exactly, and for that to work the density might need to be adjusted. For instance, an area of 3x2 cannot have a density of 2 in each direction. The true density may be obtained from either the xdensity or ydensity attribute (since these are identical for a Sheet).
Value:
param.Number(default= 10, constant= True, doc= """
            User-specified number of processing units per 1.0 distance
            horizontally or vertically in Sheet coordinates. The actual
            number may be different because of discretization; the matrix
            needs to tile the plane exactly, and for that to work the
            density might need to be adjusted.  For instance, an area of 3x2
            cannot have a density of 2 in each direction. The true density
            may be obtained from either the xdensity or ydensity attribute
...

plastic

Setting this to False tells the Sheet not to change its permanent state (e.g. any connection weights) based on incoming events.
Value:
param.Boolean(True, doc= """
            Setting this to False tells the Sheet not to change its
            permanent state (e.g. any connection weights) based on
            incoming events.
            """)

precedence

Allows a sorting order for Sheets, e.g. in the GUI.
Value:
param.Number(default= 0.1, softbounds= (0.0, 1.0), doc= """
            Allows a sorting order for Sheets, e.g. in the GUI.""")

Property Details [hide private]

density

The sheet's true density (i.e. the xdensity, which is equal to the ydensity for a Sheet.)
Get Method:
_get_density(self)