Keywords¶
This module provides the string keywords used throughout psyneulink
https://princetonuniversity.github.io/PsyNeuLink/Keywords.html

class
psyneulink.globals.keywords.
MechanismRoles
¶ 
ORIGIN
¶ A ProcessingMechanism that is the first Mechanism of a Process and/or System, and that receives the input to the Process or System when it is executed or run. A Process may have only one
ORIGIN
Mechanism, but a System may have many. Note that theORIGIN
Mechanism of a Process is not necessarily anORIGIN
of the System to which it belongs, as it may receive Projections from other Processes in the System. TheORIGIN
Mechanisms of a Process or System are listed in itsorigin_mechanisms
attribute, and can be displayed using itsshow
method. For additional details aboutORIGIN
Mechanisms in Processes, see Process Mechanisms and Process Input and Output; and for Systems see System Mechanisms and System Input and Initialization.

INTERNAL
¶ A ProcessingMechanism that is not designated as having any other status.

CYCLE
¶ A ProcessingMechanism that is not an
ORIGIN
Mechanism, and receives a Projection that closes a recurrent loop in a Process and/or System. If it is anORIGIN
Mechanism, then it is simply designated as such (since it will be assigned input and therefore be initialized in any event).

INITIALIZE_CYCLE
¶ A ProcessingMechanism that is the
sender
of a Projection that closes a loop in a Process or System, and that is not anORIGIN
Mechanism (since in that case it will be initialized in any event). Aninitial value
can be assigned to such Mechanisms, that will be used to initialize the Process or System when it is first run. For additional information, seeRun
, System Mechanisms and System Input and Initialization.

TERMINAL
¶ A ProcessingMechanism that is the last Mechanism of a Process and/or System, and that provides the output to the Process or System when it is executed or run. A Process may have only one
TERMINAL
Mechanism, but a System may have many. Note that theTERMINAL
Mechanism of a process is not necessarily aTERMINAL
Mechanism of the System to which it belongs, as it may send projections to other processes in the System (see example). TheTERMINAL
Mechanisms of a Process or System are listed in itsterminalMechanisms
attribute, and can be displayed using itsshow
method. For additional details aboutTERMINAL
Mechanisms in Processes, see Mechanisms and Process input and output; and for Systems see Mechanisms.

SINGLETON
¶ A ProcessingMechanism that is the only Mechanism in a Process and/or System. It can serve the functions of an
ORIGIN
and/or aTERMINAL
Mechanism.

LEARNING
¶ A LearningMechanism in a Process and/or System.

TARGET
¶ A ComparatorMechanism of a Process and/or System configured for learning that receives a target value from its
execute
orrun
method. It is usually (but not necessarily) associated with theTERMINAL
Mechanism of the Process or System. TheTARGET
Mechanisms of a Process or System are listed in itstarget_mechanisms
attribute, and can be displayed using itsshow
method. For additional details, see TARGET Mechanisms, learning sequence, and specifying target values.


class
psyneulink.globals.keywords.
MatrixKeywords
¶ 
IDENTITY_MATRIX
¶ a square matrix of 1’s along the diagonal, 0’s elsewhere; this requires that the length of the sender and receiver values are the same.

HOLLOW_MATRIX
¶ a square matrix of 0’s along the diagonal, 1’s elsewhere; this requires that the length of the sender and receiver values are the same.

FULL_CONNECTIVITY_MATRIX
¶ a matrix that has a number of rows equal to the length of the sender’s value, and a number of columns equal to the length of the receiver’s value, all the elements of which are 1’s.

RANDOM_CONNECTIVITY_MATRIX
¶ a matrix that has a number of rows equal to the length of the sender’s value, and a number of columns equal to the length of the receiver’s value, all the elements of which are filled with random values uniformly distributed between 0 and 1.

AUTO_ASSIGN_MATRIX
¶ if the sender and receiver are of equal length, an
IDENTITY_MATRIX
is assigned; otherwise, aFULL_CONNECTIVITY_MATRIX
is assigned.

DEFAULT_MATRIX
¶ used if no matrix specification is provided in the constructor; it presently assigns an
IDENTITY_MATRIX
.


class
psyneulink.globals.keywords.
DistanceMetrics
¶ Distance between two arrays.
Each keyword specifies a metric for the distance between two arrays, \(a_1\) and \(a_2\), of equal length for which len is their length, \(\bar{a}\) is the mean of an array, \(\sigma_{a}\) the standard deviation of an array, and \(w_{a_1a_2}\) a coupling coefficient (“weight”) between a pair of elements, one from each array:

MAX_ABS_DIFF
¶ \(d = \max(a_1a_2)\)

DIFFERENCE
¶ \(d = \sum\limits^{len}(a_1a_2)\)

EUCLIDEAN
¶ \(d = \sum\limits^{len}\sqrt{(a_1a_2)^2}\)

CORRELATION
¶ \(d = 1  \left\frac{\sum\limits^{len}(a_1\bar{a}_1)(a_2\bar{a}_2)}{(len1)\sigma_{a_1}\sigma_{ a_2}}\right\)

ENTROPY and CROSS_ENTROPY
\(d = \sum\limits^{len}a_1log(a_2)\)

ENERGY
¶ \(d = \frac{1}{2}\sum\limits_{i,j}a_{1_i}a_{2_j}w_{ij}\)
