Package: edl 1.1

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

Error-driven learning (based on the Widrow & Hoff (1960)<https://isl.stanford.edu/~widrow/papers/c1960adaptiveswitching.pdf> 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, <doi:10.1037/a0023851>) can be used to explain bottom-up human learning (Hoppe et al, <doi:10.31234/osf.io/py5kd>), 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, <doi:10.1037/a0023851>) is available on CRAN at <https://cran.r-project.org/package=ndl>. 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' <https://pyndl.readthedocs.io/en/latest/> for that purpose.)

Authors:Jacolien van Rij [aut, cre], Dorothée Hoppe [aut]

edl_1.1.tar.gz
edl_1.1.zip(r-4.5)edl_1.1.zip(r-4.4)edl_1.1.zip(r-4.3)
edl_1.1.tgz(r-4.4-any)edl_1.1.tgz(r-4.3-any)
edl_1.1.tar.gz(r-4.5-noble)edl_1.1.tar.gz(r-4.4-noble)
edl_1.1.tgz(r-4.4-emscripten)edl_1.1.tgz(r-4.3-emscripten)
edl.pdf |edl.html
edl/json (API)
NEWS

# Install 'edl' in R:
install.packages('edl', repos = c('https://jacolien.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Datasets:
  • dat - Simulated learning data.

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.00 score 2 scripts 221 downloads 1 mentions 31 exports 2 dependencies

Last updated 3 years agofrom:c40160df05. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 15 2024
R-4.5-winOKNov 15 2024
R-4.5-linuxOKNov 15 2024
R-4.4-winNOTENov 15 2024
R-4.4-macNOTENov 15 2024
R-4.3-winNOTENov 15 2024
R-4.3-macNOTENov 15 2024

Exports:activationsCueSetactivationsEventsactivationsMatrixactivationsOutcomescheckcheckWMcreateTrainingDatacreateWMcueWindowgetActivationsgetCuesgetLambdagetOutcomesgetUpdategetValuesgetWeightsByCuegetWeightsByOutcomegetWMluceChoiceplotActivationsplotCueWeightsplotNetworkplotOutcomeWeightsRWlearningRWlearningMatrixRWlearningNoCueCompetitionRWlearningNoOutcomeCompetitionsetBackgroundupdateWeightsupdateWeightsNoCueCompetitionupdateWeightsNoOutcomeCompetition

Dependencies:data.tableplotfunctions

EDL

Rendered fromedl.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2021-04-12
Started: 2021-04-12

Readme and manuals

Help Manual

Help pageTopics
Calculate the change in activation for a specific cue or set of cues.activationsCueSet
Calculate the activations for each learning event.activationsEvents
Calculate the activations for one or a set of cues.activationsMatrix
Calculate the activations for all outcomes in the data.activationsOutcomes
Remove empty cues and/or outcomes.check
Check whether cues and outcomes exist in a weight matrix and optionally add.checkWM
Create event training data from a frequency data frame.createTrainingData
Create empty weight matrix based on a set of cues and outcomes.createWM
Create a 'cue window', for overlapping or continuous cues.cueWindow
Simulated learning data.dat
Toolbox for Error-Driven Learning Simulations with Two-Layer Networksedl
Function to calculate the activations.getActivations
Extract cues from list of weightmatrices.getCues
Retrieve the lambda values for all or specific outcomes for each learning event.getLambda
Extract outcomes from list of weightmatrices.getOutcomes
Retrieve the weight updates and their change for each learning event.getUpdate
Retrieve all cues from a vector of text strings.getValues
Extract the change of connection weights between a specific cue and all outcomes.getWeightsByCue
Extract the change of connection weights between all cues and a specific outcome.getWeightsByOutcome
Retrieve all cues from a vector of text strings.getWM
Function implementing the Luce choice rule.luceChoice
Visualize the change of connection weights between a specific outcome and all cues.plotActivations
Visualize the change of connection weights between a specific cue and all outcomes.plotCueWeights
Return strong weights.plotNetwork
Visualize the change of connection weights between a specific outcome and all cues.plotOutcomeWeights
Function implementing the Rescorla-Wagner learning.RWlearning
Function implementing the Rescorla-Wagner learning.RWlearningMatrix
Function implementing the Rescorla-Wagner learning equations without cue competition (for illustration purposes).RWlearningNoCueCompetition
Function implementing the Rescorla-Wagner learning equetions without outcome competition (for illustration purposes).RWlearningNoOutcomeCompetition
Set value background cue.setBackground
Function implementing the Rescorla-Wagner learning for a single learning event.updateWeights
Function implementing the Rescorla-Wagner learning equations without cue competition for a single learning event.updateWeightsNoCueCompetition
Function implementing the Rescorla-Wagner learning equations without outcome competition (for illustration purposes) for a single learning event.updateWeightsNoOutcomeCompetition