estimateWeightsCompact {ndl}R Documentation

Estimation of the association weights using the equilibrium equations of Danks (2003) for the Rescorla-Wagner equations using a compact binary event file.

Description

A function to estimate the weights (associative strengths) for cue-outcome pairs when learning is in equilibrium, using the equilibrium equations for the Rescorla-Wagner model of Danks (2003) using a compact binary event file.

Usage

estimateWeightsCompact(datasource, removeDuplicates=TRUE,
saveCounts=FALSE, verbose=FALSE, MaxEvents=100000000000000,
trueCondProb=TRUE, addBackground=FALSE, ...)

Arguments

datasource

A data source that is linked with a file naming convention. If the datasource is the string "source", then the following resources will need to exist in the current working directory:

source.events

A directory that contains binary event files in the format specified in learn.module.cpp

source.cues

A text file that contains the full list of cues in the first column, and separated by a tab, the CueID for each cue. Must be encoded in UTF8.

source.outcomes

A text file that contains the full list of outcomes in the first column, and separated by a tab, the OutcomeID for each outcome. Must be encoded in UTF8.

removeDuplicates

A logical specifying whether multiple occurrences of a Cue in conjunction with an Outcome shall each be counted as a distinct occurrence of that Cue (FALSE), or only as a single occurrence (TRUE: default).

saveCounts

A logical specifying whether the co-occurrence matrices should be saved. If set equal to TRUE, the files coocCues.rda and coocCuesOutcomes.rda will be saved in the current workspace. Default is FALSE.

verbose

If set to TRUE, display diagnostic messages.

MaxEvents

If changed from the default value, the learning algorithm will stop learning after using the first N events in the training data. This actually number of events used may be slightly higher than the number specified.

addBackground

If you would like to add a background rate for all your cues and outcomes, but did not include an general environment cue to all your events, one will be added for you to the matrices, as specified in Danks (2003). If changed from the default (FALSE) to TRUE, background cues will be added. The name used for the background rates is "Environ", and will be included in the output weight matrix.

trueCondProb

The conditional probability calculations used will be those specified in Danks (2003). If changed from the default (TRUE) to FALSE, the normalization specified in Baayen, et al (2011) is used.

...

Control arguments to be passed along from ndlClassify and/or ndlCrossvalidate.

Details

Using Rcpp, a C++ based implementation processes all of the data RAM. The module will check the amount of RAM you have available in your system and warn you of RAM is insufficient to build your model.

Value

A matrix with cue-to-outcome association strengths. Rows are cues, and columns are outcomes. Rows and columns are labeled. If addBackground=T, a row named "Environ" will be added to the output.

Acknowledgements

Thanks to all the beta testers of the ndl package.

Note

Add a note here.

Author(s)

Cyrus Shaoul, R. H. Baayen and Petar Milin, with contributions from Antti Arppe and Peter Hendrix.

References

Baayen, R. H. and Milin, P. and Filipovic Durdevic, D. and Hendrix, P. and Marelli, M., (2011) An amorphous model for morphological processing in visual comprehension based on naive discriminative learning. Psychological Review, 118, 438-482.

See Also

estimateActivations

Examples

  message("This module requires data in a non-portable format to
demonstrate how it works.")

[Package ndl version 0.2.18 Index]