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
hetero parameters on the RecurrentTransferMechanism to help update its matrix:
this allows for a ControlMechanism to control the
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
Auto Associative Structure¶
In structure, the AutoAssociativeProjection is almost identical to a MappingProjection: the only additional attributes
Due to its specialized nature, most parameters of the AutoAssociativeProjection are not configurable: the
determined by the format of the output of the RecurrentTransferMechanism, the
function is always LinearMatrix, 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).
An AutoAssociativeProjection uses its
matrix parameter to transform the value of
sender, and provide the result as input for its
receiver, the primary InputPort of the RecurrentTransferMechanism.
During execution the AutoAssociativeProjection updates its
on the `RecurrentTransferMechanism`. (The
hetero parameters of the AutoAssociativeProjection simply refer to their
counterparts on the RecurrentTransferMechanism as well.) The reason for putting the
hetero parameters on the
RecurrentTransferMechanism is that this allows them to be modified by a ControlMechanism.
- exception psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeError(error_value)¶
- 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)¶
Subclass of MappingProjection that is self-recurrent on a RecurrentTransferMechanism. See MappingProjection and Projection for additional arguments and attributes.
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 the
variableof 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 the
matrix (list, np.ndarray, np.matrix, function or keyword : default DEFAULT_MATRIX) – specifies the matrix used by
LinearCombination) to transform the
senderinto a value provided to the
receiverInputPort; must be a square matrix (i.e., have the same number of rows and columns).
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
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
square matrix used by
functionto transform input from the
senderto the value provided to the
receiver; in the case of an AutoAssociativeProjection.
An optional method that will take any Parameter values in context that are classes/types, and instantiate them.