AutoAssociativeProjection¶
Contents¶
Overview¶
An AutoAssociativeProjection is a subclass of MappingProjection that acts as the recurrent projection for a
RecurrentTransferMechanism. The primary difference between an AutoAssociativeProjection and a basic MappingProjection
is that an AutoAssociativeProjection uses the auto and
hetero parameters on the RecurrentTransferMechanism to help update its matrix:
this allows for a ControlMechanism to control the auto and
hetero parameters and thereby control the matrix.
AutoAssociativeProjection represents connections between nodes in a single-layer recurrent network. It multiplies the output of the RecurrentTransferMechanism by a matrix, then presents the product as input to the RecurrentTransferMechanism.
Creating an AutoAssociativeProjection¶
An AutoAssociativeProjection is created automatically by a RecurrentTransferMechanism (or its subclasses), and is
stored as the recurrent_projection parameter of the
RecurrentTransferMechanism. It is not recommended to create an AutoAssociativeProjection on its own, because during
execution an AutoAssociativeProjection references parameters owned by its RecurrentTransferMechanism (see
Execution below).
Auto Associative Structure¶
In structure, the AutoAssociativeProjection is almost identical to a MappingProjection: the only additional attributes
are auto and hetero.
Configurable Attributes¶
Due to its specialized nature, most parameters of the AutoAssociativeProjection are not configurable: the variable is
determined by the format of the output of the RecurrentTransferMechanism, the function is always MatrixTransform, and so
on. The only configurable parameter is the matrix, configured through the matrix, auto, and/or hetero
arguments for a RecurrentTransferMechanism:
matrix - multiplied by the input to the AutoAssociativeProjection in order to produce the output. Specification of the matrix, auto, and/or hetero arguments determines the values of the matrix; auto determines the diagonal entries (representing the strength of the connection from each node to itself) and hetero determines the off-diagonal entries (representing connections between nodes).
Execution¶
An AutoAssociativeProjection uses its matrix parameter to transform the value of
its sender, and provide the result as input for its
receiver, the primary InputPort of the RecurrentTransferMechanism.
Note
During execution the AutoAssociativeProjection updates its matrix and hetero parameters
on the `RecurrentTransferMechanism`. (The auto and
hetero parameters of the AutoAssociativeProjection simply refer to their
counterparts on the RecurrentTransferMechanism as well.) The reason for putting the auto and hetero parameters on the
RecurrentTransferMechanism is that this allows them to be modified by a ControlMechanism.
Class Reference¶
- exception psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeError(message, component=None)¶
- class psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection(owner=None, sender=None, receiver=None, matrix=None, function=None, params=None, name=None, prefs=None, **kwargs)¶
- AutoAssociativeProjection(
)
Subclass of MappingProjection that is self-recurrent on a RecurrentTransferMechanism. See MappingProjection and Projection for additional arguments and attributes.
- Parameters:
sender (OutputPort or Mechanism : default None) – specifies the source of the Projection’s input; must be (or belong to) the same Mechanism as receiver, and the length of its
valuemust match that of thevariableof the receiver.receiver (InputPort or Mechanism : default None) – specifies the destination of the Projection’s output; must be (or belong to) the same Mechanism as sender, and the length of its
variablemust match thevalueof sender.matrix (list, np.ndarray, function or keyword : default DEFAULT_MATRIX) – specifies the matrix used by
function(default:LinearCombination) to transform thevalueof thesenderinto a value provided to thevariableof thereceiverInputPort; must be a square matrix (i.e., have the same number of rows and columns).
- sender¶
the OutputPort of the Mechanism that is the source of the Projection’s input; in the case of an AutoAssociativeProjection, it is an OutputPort of the same Mechanism to which the
receiverbelongs.- Type:
- receiver¶
the InputPort of the Mechanism that is the destination of the Projection’s output; in the case of an AutoAssociativeProjection, it is an InputPort of the same Mechanism to which the
senderbelongs.- Type:
- matrix¶
square matrix used by
functionto transform input from thesenderto the value provided to thereceiver; in the case of an AutoAssociativeProjection.- Type:
2d np.ndarray
- _instantiate_parameter_classes(context)¶
An optional method that will take any Parameter values in context that are classes/types, and instantiate them.