getLambda {edl}R Documentation

Retrieve the lambda values for all or specific outcomes for each learning event.

Description

For a given set of training data, the lambda values are returned for each or specific outcomes. The values are returned as data frame.

Usage

getLambda(data, lambda = 1, split = "_", select.outcomes = NULL)

Arguments

data

Data with columns Cues and Outcomes, as generated with createTrainingData.

lambda

Numeric, value of lambda parameter. Defaults to 1.

split

String, separator between cues or outcomes.

select.outcomes

Optional selection of outcomes to limit the number of activations that are returned. The value of NULL (default) will return all activations. Note that specified values that are not in the weightmatrices will return the initial value without error or warning. Please use getValues for returning all outcomes in the data.

Value

Data frame.

Author(s)

Jacolien van Rij

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
head(dat)
dim(dat)
test <- getLambda(dat)
# only outcomes that do not occur in data results in 0:
test2 <- getLambda(dat, select.outcomes=c("a", "b", "C"))


[Package edl version 1.1 Index]