estimateActivations {ndl} | R Documentation |
Estimation of the activations of outcomes (meanings)
Description
estimateActivations
is used to estimate the activations for
outcomes (meanings) using the equilibrium association strengths
(weights) for the Rescorla-Wagner model.
Usage
estimateActivations(cuesOutcomes, weightMatrix, unique=FALSE, ...)
Arguments
cuesOutcomes |
A data frame with three variables specifying frequency, cues, and outcomes:
|
weightMatrix |
A numeric matrix with as dimensions the number of cues (horizontal) and number of outcomes (vertical). Rows and columns should be labeled with cues and outcomes. |
unique |
A logical that, if |
... |
Control arguments to be passed along from
|
Details
The activation of an outcome is defined as the sum of the weights on
the incoming links from active cues. When the input (the Cues
in cuesOutcomes
) contain elements that are not present in the
rownames of the weightMatrix
, such new cues are added to the
weightMatrix
with zero entries. The set of exemplars in
cuesOutcomes
may contain rows with identical cue sets but
different outcome sets. Consequently, for such rows, identical vectors
of activations of outcomes are generated. In the activation matrix
returned by estimateActivations
, such duplicate entries are
removed.
For examples of how the cuesOutcomes
data frame should be
structured, see the data sets danks
,
plurals
, and serbian
. For examples of how
the weightMatrix
should be structured, see the corresponding
output of estimateWeights
.
Value
A list with the following components:
activationMatrix
A matrix with as dimensions, for rows, the number of exemplars (by-row cue sets, typically word forms), and for columns, the number of unique outcomes (meanings), specifying the activation of a meaning given the cues in the input for a given exemplar.
newCues
A vector of cues encountered in
cuesOutcomes
which were not present inweightMatrix
.- ...
-
Control arguments to be passed along from
ndlClassify
, and/orndlCrossvalidate
.
Author(s)
R. H. Baayen & Antti Arppe
References
Baayen, R. H. and Milin, P. and Filipovic Durdevic, D. and Hendrix, P. and Marelli, M., An amorphous model for morphological processing in visual comprehension based on naive discriminative learning. Psychological Review, 118, 438-482.
See Also
estimateWeights, danks, plurals, serbian
Examples
data(serbian)
serbian$Cues <- orthoCoding(serbian$WordForm, grams=2)
serbian$Outcomes <- serbian$LemmaCase
sw <- estimateWeights(cuesOutcomes=serbian)
sw[1:5,1:6]
activations <- estimateActivations(unique(serbian["Cues"]), sw)$activationMatrix
rownames(activations) <- unique(serbian[["WordForm"]])
activations[1:5,1:6]
syntax <- c("acc", "dat", "gen", "ins", "loc", "nom", "Pl", "Sg")
activations2 <- activations[,!is.element(colnames(activations),syntax)]
head(rownames(activations2), 50)
head(colnames(activations2), 8)
image(activations2, xlab="word forms", ylab="meanings", xaxt="n", yaxt="n")
mtext(c("yena", "...", "zvuke"), side=1, line=1, at=c(0, 0.5, 1), adj=c(0,0,1))
mtext(c("yena", "...", "zvuk"), side=2, line=1, at=c(0, 0.5, 1), adj=c(0,0,1))