checkWM {edl}R Documentation

Check whether cues and outcomes exist in a weight matrix and optionally add.

Description

Check whether cues and outcomes exist in a weight matrix and optionally add.

Usage

checkWM(cues, outcomes, wm)

Arguments

cues

A vector with cues.

outcomes

A vector with outcomes.

wm

A matrix with connection weights between cues and outcomes.

Value

A weightmatrix (matrix)

Author(s)

Jacolien van Rij

Examples

data(dat)
# create training data:
dat$Cues <- paste("BG", dat$Shape, dat$Color, sep="_")
dat$Outcomes <- dat$Category
dat$Frequency <- 1
train <- createTrainingData(dat)
# train network:
wm <- RWlearning(train)
# inspect weight matrix:
wm[[1]]
# retrieve cues and outcomes from data:
c <- getCues(wm)
o <- getOutcomes(wm)
# add missing cues to initial weight matrix:
checkWM(c, o, wm=wm[[1]])


[Package edl version 1.0 Index]