activationsCueSet {edl}  R Documentation 
Calculate the change in activation for a specific cue or set of cues for all outcomes (or a subset) in the weightmatrices.
activationsCueSet( wmlist, cueset, split = "_", select.outcomes = NULL, init.value = 0, normalize = FALSE )
wmlist 
A list with weightmatrices, generated by

cueset 
String, specifying the cue set for which to calculate change in activation. 
split 
String, separator between cues and/or outcomes. 
select.outcomes 
Optional selection of outcomes to limit
(or expand) 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. 
List of data frames.
For each cueset defined in cueset
, a dataframe of
activation values is provided. These are returned as a list, with the
cuesets as names.
The outcomes are selected based on the weightmatrices, and not necessarily all outcomes present in the training data.
Jacolien van Rij
getWeightsByCue
,
getWeightsByOutcome
Other functions for calculating activations:
activationsEvents()
,
activationsMatrix()
,
activationsOutcomes()
,
getActivations()
# load example data: data(dat) # add obligatory columns Cues, Outcomes, and Frequency: dat$Cues < paste("BG", dat$Shape, dat$Color, sep="_") dat$Outcomes < dat$Category dat$Frequency < dat$Frequency1 head(dat) # now use createTrainingData to sample from the specified frequencies: train < createTrainingData(dat) head(train) # this training data can actually be used train network: wm < RWlearning(train) # Now we calculate the activations for all outcomes # per event: activations < activationsCueSet(wm, cueset="BG_bicycle_red") names(activations) head(activations[[1]]) # plot: a1 < activations[[1]] emptyPlot(nrow(a1), range(a1), xlab="Learning events", ylab="Activations", xmark=TRUE, ymark=TRUE, las=1) for(i in 1:ncol(a1)){ lines(a1[,i], col=i, lty=i) } legend_margin('topleft', legend=colnames(a1), col=1:ncol(a1), lty=1:ncol(a1), bty='n', cex=.75)