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

class
psyneulink.core.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.core.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
¶ (can also be referenced as L0)
\(d = \sum\limits^{len}(a_1a_2)\)

EUCLIDEAN
¶ (can also be referenced as L1)
\(d = \sum\limits^{len}\sqrt{(a_1a_2)^2}\)

COSINE
¶ \(d = 1  \frac{\sum\limits^{len}a_1a_2}{\sqrt{\sum\limits^{len}a_1^2}\sqrt{\sum\limits^{len}a_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\)

CROSS_ENTROPY
¶ (can also be referenced as 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}\)
