Argument st
must be a list containing the following required
items: training_items
, tr
, nCats
, nFeat
,
sensitivity
, weights
, choice_bias
, p
,
r_metric
, mp
, and gamma
nCats
- integer indicating the number of categories
nFeat
- integer indicating the number of stimulus dimensions
tr
- the stimuli presented to the model, for which the choice
probabilities will be predicted. tr
has to be a matrix or
dataframe with one row for each stimulus. tr
requires the
following columns.
x1, x2, …
- columns for each dimension carrying the
corresponding values (have to be coded as numeric values) for each
exemplar (trial) given in the row. Columns have to start with
x1
ascending with dimensions …, x2, x3, …
at
adjacent columns.
tr
may have any number of additional columns with any desired
name and position, e.g. for readability. As long as the feature columns
x1, x2, …
are given as defined (i.e. not scattered, across
the range of matrix columns), the output is not affected by optional
columns.
training_items
- all unique exemplars assumed to be stored in
memory; has to be a matrix or dataframe with one row for each exemplar.
The rownames have to start with 1 in ascending order.
training_items
requires the following columns:
x1, x2, …
- columns for each feature dimension carrying
the corresponding values (have to be coded as numeric values) for each
exemplar (row). Columns have to start with x1
ascending with
dimensions …, x2, x3, …
at adjacent columns.
cat1, cat2, …
- columns that indicate the category
assignment of each exemplar (row). For example, if the exemplar in row
2 belongs to category 1 the corresponding cell of cat1
has to
be set to 1
, else 0
. Columns have to start with
cat1
ascending with categories …, cat2, cat3, …
at adjacent columns.
mem
- (optional) one column that indicates whether an exemplar
receives an extra memory weight, yes = 1
, no = 0
.
For each exemplar (row) in the training_items
with mem
set to 0
the corresponding memory strength parameter is set to 1.
When mem
for an exemplar is set to 1
the memory strength
parameter is set as defined in mp
, see below.
training_items
may have any number of additional columns with any
desired name and position, e.g. for readability. As long as the feature
columns x1, x2, …
and cat1, cat2, …
are given as
defined (i.e. not scattered, across the range of matrix columns), the
output is not affected by optional columns.
NOTE: The current model can be implemented as a prototype model if
the training_items
only carry one row for each category representing
the values of the corresponding prototypes (e.g. see Minda & Smith, (2011).
mp
- memory strength parameter (optional). Can take any numeric
value between -Inf and +Inf. The default is 1, i.e. all exemplars have
the same memory strength. There are two ways of specifying mp
,
i.e. either globally or exemplar specific:
When globally setting mp
to a single integer,
e.g. to 5, then all exemplars in training_items
with mem
= 1 will receive a memory strength 5 times higher than the memory strengths
for the remaining exemplars.
For setting exemplar specific memory strengths mp
has to be
a vector of length n, where n is the overall number of of exemplars with
mem
= 1 in the training_items
. The order of memory strengths
defined in this vector exactly follows their row-wise ascending order of
appearence in the training_items
. E.g. if there are two exemplars
with mem
= 1 in the training_items
, the first one in row 2
and the second one in row 10, then setting mp
to c(3,2) will result
in assigning a memory strength of 3 to the first exemplar (in row 2) and
a memory strength of 2 to the second exemplar (in row 10). The memory
strengths for all other exemplars will be set to 1. See Note 1.
sensitivity
- sensitivity parameter c; can take any value
between 0 (all exemplars are equally similar) and +infinity
(towards being insensitive to large differences). There are two ways
of specifying sensitivity
, i.e. either globally or
exemplar specific: When globally setting sensitivity
to a single value, e.g. sensitivity
=3, then the same parameter is
applied to all exemplars. On the other hand, exemplar specific
sensitivity parameters can be used by defining sensitivity
as
a vector of length n, where n is the number of rows in
training_items
. The sensitivity
vector values then represent
the sensitivity parameters for all exemplars in training_items
at
the corresponding row positions. E.g. if there are 3 exemplars (rows) in
training_items
, then setting sensitivity
to c(1,1,3)
assigns sensitivity
= 1 to the first two exemplars, and
sensitivity
= 3 for the third exemplar. See Note 2.
weights
- dimensional attention weights. Order corresponds
to the definitions of x1, x2, …
in tr
and
training_items
. Has to be a vector with length n-1 , where n
equals to nFeat
dimension weights, e.g. of length 2 when
there are three features, leaving out the last dimension. A
constraint in the GCM is that all attentional weights sum to 1. Thus,
the sum of n-1 weights should be equal to or smaller than 1, too. The
last n-th weight then is computed within the model with: 1 - (sum of
n-1 feature weights). When setting the weights to 1/nFeat
=
equal weights. See Note 3.
choice_bias
- Category choice biases. Has to be a vector with
length n-1, where n equals to nCats
category biases, leaving out
the last category bias, under the constraint that all biases sum to 1.
Order corresponds to the definitions of cat1, cat2
in the
training_items
. The sum of n-1 choice biases has to be equal
to or smaller than 1. Setting the weights to 1/nCats
= no
choice bias. The bias for the last category then is computed in the
model with: 1 - (sum of nCats
-1 choice biases). See Note 3.
gamma
- decision constant/ response scaling. Can take any
value between 0 (towards more probabilistic) and +infinity (towards
deterministic choices). Nosofsky (2011) suggests setting gamma higher
than 1 when individual participants' data are considered. See Note 2.
r_metric
- distance metric. Set to 1 (city-block) or 2
(Euclidean). See Nosofsky (2011), and Note 4, for more details.
p
- similarity gradient. Set to 1 (exponential) or 2 (Gaussian).
See Nosofsky (2011), for more details.