checkWM: Check whether cues and outcomes exist in a weight matrix and...

Description Usage Arguments Value Author(s) Examples

View source: R/checkWM.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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]])

edl documentation built on Sept. 20, 2021, 9:09 a.m.

Related to checkWM in edl...