activationsMatrix {edl}  R Documentation 
Calculate the activations for one or a set of cues. The values are returned as vector or data frame.
activationsMatrix( wm, cues, split = "_", select.outcomes = NULL, init.value = 0, normalize = FALSE )
wm 
A weightmatrix, generated by

cues 
String or vector of strings. Each string represents a set of
cues, separated by 
split 
String, separator between cues. 
select.outcomes 
Optional selection of outcomes to limit the
number of activations that are returned. The value of NULL (default) will
return all activations (for each outcome in 
init.value 
Value of activations for nonexisting connections. Typically set to 0. 
normalize 
Logical: whether or not the activation is normalized by dividing the total activation by the number of cues. Default is FALSE. If set to TRUE, the activation reflects the average activation per cue. 
Vector or data frame.
Jacolien van Rij
getWeightsByCue
,
getWeightsByOutcome
Other functions for calculating activations:
activationsCueSet()
,
activationsEvents()
,
activationsOutcomes()
,
getActivations()
# load example data: data(dat) # setup data: newdat < data.frame(Cues =paste("BG", dat$Shape, dat$Color, sep="_"), Outcomes = dat$Category, Frequency = dat$Frequency2) train < createTrainingData(newdat) # learning: wm < RWlearning(train) # calculate activations for all outcomes: mat < getWM(wm) activationsMatrix(mat, cues="BG_tree_green") # only accepts one set of cues  in this case all cues # are combined: activationsMatrix(mat, cues=c("BG_tree", "BG_tree_brown")) # ... which is the same as this: activationsMatrix(mat, cues=c("BG", "BG", "tree", "tree", "brown")) # now select one outcome: activationsMatrix(mat, cues=c("BG", "tree"), select.outcomes="vehicle") # cues/outcomes not in matrix: activationsMatrix(mat, cues=c("na"), select.outcomes="new")