getWM {edl} | R Documentation |
Retrieve all cues from a vector of text strings.
Description
Retrieve all cues from a vector of text strings.
Usage
getWM(wmlist, event = NULL)
Arguments
wmlist |
A list with weightmatrices for each learning event,
generated by |
event |
Numeric: for which event to return the weight matrix. Defaults to NULL, which wil return the last weight matrix. |
Value
A matrix with connection weights between cues (rows) and outcomes.
Author(s)
Jacolien van Rij
See Also
RWlearning
, getWeightsByCue
,
getWeightsByOutcome
Examples
# 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)
dim(dat)
# now use createTrainingData to sample from the specified frequencies:
train <- createTrainingData(dat)
# this training data can actually be used train network:
wm <- RWlearning(train)
# final weight matrix:
getWM(wm)
# ... which is the same as:
wm[[length(wm)]]
# 25th learning event:
getWM(wm, event=25)
# ... which is the same as:
wm[[25]]
[Package edl version 1.1 Index]