Learn R Programming

edl (version 1.1)

Toolbox for Error-Driven Learning Simulations with Two-Layer Networks

Description

Error-driven learning (based on the Widrow & Hoff (1960) learning rule, and essentially the same as Rescorla-Wagner's learning equations (Rescorla & Wagner, 1972, ISBN: 0390718017), which are also at the core of Naive Discrimination Learning, (Baayen et al, 2011, ) can be used to explain bottom-up human learning (Hoppe et al, ), but is also at the core of artificial neural networks applications in the form of the Delta rule. This package provides a set of functions for building small-scale simulations to investigate the dynamics of error-driven learning and it's interaction with the structure of the input. For modeling error-driven learning using the Rescorla-Wagner equations the package 'ndl' (Baayen et al, 2011, ) is available on CRAN at . However, the package currently only allows tracing of a cue-outcome combination, rather than returning the learned networks. To fill this gap, we implemented a new package with a few functions that facilitate inspection of the networks for small error driven learning simulations. Note that our functions are not optimized for training large data sets (no parallel processing), as they are intended for small scale simulations and course examples. (Consider the python implementation 'pyndl' for that purpose.)

Copy Link

Version

Install

install.packages('edl')

Monthly Downloads

214

Version

1.1

License

GPL (>= 2)

Last Published

September 20th, 2021

Functions in edl (1.1)

activationsMatrix

Calculate the activations for one or a set of cues.
cueWindow

Create a 'cue window', for overlapping or continuous cues.
luceChoice

Function implementing the Luce choice rule.
dat

Simulated learning data.
plotActivations

Visualize the change of connection weights between a specific outcome and all cues.
plotCueWeights

Visualize the change of connection weights between a specific cue and all outcomes.
activationsEvents

Calculate the activations for each learning event.
activationsCueSet

Calculate the change in activation for a specific cue or set of cues.
createTrainingData

Create event training data from a frequency data frame.
createWM

Create empty weight matrix based on a set of cues and outcomes.
getCues

Extract cues from list of weightmatrices.
getLambda

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

Extract the change of connection weights between a specific cue and all outcomes.
getWeightsByOutcome

Extract the change of connection weights between all cues and a specific outcome.
RWlearning

Function implementing the Rescorla-Wagner learning.
RWlearningMatrix

Function implementing the Rescorla-Wagner learning.
RWlearningNoCueCompetition

Function implementing the Rescorla-Wagner learning equations without cue competition (for illustration purposes).
RWlearningNoOutcomeCompetition

Function implementing the Rescorla-Wagner learning equetions without outcome competition (for illustration purposes).
getActivations

Function to calculate the activations.
getValues

Retrieve all cues from a vector of text strings.
edl

Toolbox for Error-Driven Learning Simulations with Two-Layer Networks
getWM

Retrieve all cues from a vector of text strings.
plotNetwork

Return strong weights.
check

Remove empty cues and/or outcomes.
updateWeightsNoCueCompetition

Function implementing the Rescorla-Wagner learning equations without cue competition for a single learning event.
updateWeights

Function implementing the Rescorla-Wagner learning for a single learning event.
checkWM

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

Extract outcomes from list of weightmatrices.
getUpdate

Retrieve the weight updates and their change for each learning event.
plotOutcomeWeights

Visualize the change of connection weights between a specific outcome and all cues.
setBackground

Set value background cue.
updateWeightsNoOutcomeCompetition

Function implementing the Rescorla-Wagner learning equations without outcome competition (for illustration purposes) for a single learning event.
activationsOutcomes

Calculate the activations for all outcomes in the data.