Title: | Modelling and Simulating Judgments of Frequency |
---|---|
Description: | In a typical experiment for the intuitive judgment of frequencies (JoF) different stimuli with different frequencies are presented. The participants consider these stimuli with a constant duration and give a judgment of frequency. These judgments can be simulated by formal models: PASS 1 and PASS 2 based on Sedlmeier (2002, ISBN:978-0198508632), MINERVA 2 baesd on Hintzman (1984) <doi:10.3758/BF03202365> and TODAM 2 based on Murdock, Smith & Bai (2001) <doi:10.1006/jmps.2000.1339>. The package provides an assessment of the frequency by determining the core aspects of these four models (attention, decay, and presented frequency) that can be compared to empirical results. |
Authors: | Markus Burkhardt [aut, cre] |
Maintainer: | Markus Burkhardt <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-11 03:43:50 UTC |
Source: | https://github.com/cran/JoF |
Modeling Judgments of Frequency with MINERVA 2
MINERVA2(x, y, ..., sqc, L, dec = NULL)
MINERVA2(x, y, ..., sqc, L, dec = NULL)
x |
input handled by MINERVA 2. Values -1, 0 and 1 are allowed. -1 represents the absence of a feature, 0 the irrelevance of a feature and 1 the presence of a feature. |
y |
another input handled by MINERVA 2. At least two inputs are needed for the simulation. |
... |
other inputs for modeling. |
sqc |
sequence of the different objects. Each input gets
an ascending number. |
L |
learning parameter. This is the proportion of a
correctly stored vector. |
dec |
decay is not part of the original version of MINERVA 2.
This is just implemented for a better comparison with the other
models of JoF. In |
Calculations of MINERVA 2 contain four steps.
MINERVA2 returns the relative judgment of frequency
Dougherty, M. R., Gettys, C. F., & Ogden, E. E. (1999). MINERVA-DM: A memory processes model for judgments of likelihood. Psychological Review, 106(1), 180.
Hintzman, D. L. (1984). MINERVA 2: A simulation model of human memory. Behavior Research Methods, Instruments, and Computers, 16, 96–101.
#This example is presented in Dougherty, #Gettys, & Ogden, 1999 (p. 185) H1 <- c(-1, 1, 0, 1, 0, -1, 1, -1, 0) H2 <- c(-1, 0, 0, 1, 0, 0, 1, 0, 0) x <- MINERVA2(H1, H2, sqc = c(2, 1), L = 1)
#This example is presented in Dougherty, #Gettys, & Ogden, 1999 (p. 185) H1 <- c(-1, 1, 0, 1, 0, -1, 1, -1, 0) H2 <- c(-1, 0, 0, 1, 0, 0, 1, 0, 0) x <- MINERVA2(H1, H2, sqc = c(2, 1), L = 1)
Modeling Judgments of Frequency with PASS 1
PASS1(x, y, ..., sqc, att, dec, ifc, rdm_weights = TRUE, noise = 0)
PASS1(x, y, ..., sqc, att, dec, ifc, rdm_weights = TRUE, noise = 0)
x |
input handled by PASS 1. Only binary input is allowed. |
y |
a second binary input handled by PASS 1. At least two inputs are needed for the simulation. |
... |
other binary inputs for modeling. |
sqc |
sequence of the different objects. Each input gets
an ascending number. |
att |
attention is a vector with numeric values
between 0 and 1. |
dec |
decay is a vector with numeric values between
-1 and 0. |
ifc |
interference is a vector with numeric values
between -1 and 0. |
rdm_weights |
a logical value indicating whether random
weights in the neural network are used or not. If
|
noise |
a proportion between 0 and 1 which determine the number of randome activiated inputunits (hihger numbers indicate higher noise). |
PASS 1 is a simple neural pattern associator learning by delta rule.
Learning:
Interference:
Decay:
PASS1
returns the relative judgment of frequency
for each input.
Sedlmeier, P. (2002). Associative learning and frequency judgements: The PASS model. In P. Sedlmeier, T. Betsch (Eds.), Etc.: Frequency processing and cognition (pp. 137-152). New York: Oxford University Press.
o1 <- c(1, 0, 0, 0) o2 <- c(0, 1, 0, 0) o3 <- c(0, 0, 1, 0) o4 <- c(0, 0, 0, 1) PASS1(o1, o2, o3, o4, sqc = rep(1:4, 4:1), att = .1, dec = -.05, ifc = -.025, rdm_weights = FALSE, noise = 0)
o1 <- c(1, 0, 0, 0) o2 <- c(0, 1, 0, 0) o3 <- c(0, 0, 1, 0) o4 <- c(0, 0, 0, 1) PASS1(o1, o2, o3, o4, sqc = rep(1:4, 4:1), att = .1, dec = -.05, ifc = -.025, rdm_weights = FALSE, noise = 0)
Modelling Judgments of Frequency with PASS 2
PASS2(x, y, ..., sqc, att, n_output_units = "half", rdm_weights = F, noise = 0)
PASS2(x, y, ..., sqc, att, n_output_units = "half", rdm_weights = F, noise = 0)
x |
input handled by PASS 2. Only binary input is allowed. |
y |
a second binary input handled by PASS 1. At least two inputs are needed for the simulation. |
... |
other binary inputs for modeling. |
sqc |
sequence of the different objects. Each input gets
an ascending number. |
att |
attention is a vector with numeric values
between 0 and 1. |
n_output_units |
number of output units as numeric value.
This must be between 1 and the maximum number of input units.
|
rdm_weights |
a logical value indicating whether random
weights in the neural network are used or not. If
|
noise |
a proportion between 0 and 1 which determines the number of random activated input units (higher numbers indicate higher noise). |
PASS 2 uses a competitive learning algorithm, which usually clusters the input as side effect. If weights are equal, the winning unit is chosen randomly, because of this, each simulation is slightly different.
PASS2
returns the relative judgment of frequency
for each input.
Sedlmeier, P. (2002). Associative learning and frequency judgements: The PASS model. In P. Sedlmeier, T. Betsch (Eds.), Etc.: Frequency processing and cognition (pp. 137-152). New York: Oxford University Press.
o1 <- c(1, 0, 0, 0) o2 <- c(0, 1, 0, 0) o3 <- c(0, 0, 1, 0) o4 <- c(0, 0, 0, 1) PASS2(o1, o2, o3, o4, sqc = rep(1:4, 4:1), att = .1, n_output_units = 2, rdm_weights = FALSE, noise = 0)
o1 <- c(1, 0, 0, 0) o2 <- c(0, 1, 0, 0) o3 <- c(0, 0, 1, 0) o4 <- c(0, 0, 0, 1) PASS2(o1, o2, o3, o4, sqc = rep(1:4, 4:1), att = .1, n_output_units = 2, rdm_weights = FALSE, noise = 0)
plot progress of judgment of frequency simulation
## S3 method for class 'JoF' plot(x, type = "l", ...)
## S3 method for class 'JoF' plot(x, type = "l", ...)
x |
output of JoF simulation |
type |
"l" for lines, "p" for points, "b" for both |
... |
further arguments |
Displays the judgment of frequency as proportion of all inputs
Output of judgment of frequecny simulation
## S3 method for class 'JoF' print(x, ...)
## S3 method for class 'JoF' print(x, ...)
x |
output of JoF simulation |
... |
further arguments |
Displays the judgment of frequency as proportion of all inputs
Modeling Judgments of Frequency with TODAM 2
TODAM2(x, y, ..., sqc, gamma = 1, alpha = 1)
TODAM2(x, y, ..., sqc, gamma = 1, alpha = 1)
x |
input handled by TODAM 2. Normal distributed inputs with mean = 0 and sd = 1 / n are allowed. This representation enables discrimination and similarity between different items. See vignette for details. |
y |
another input handled by TODAM 2. At least two inputs are needed for the simulation. |
... |
other inputs handled by TODAM 2. |
sqc |
sequence of the different objects. Each input gets
an ascending number. |
gamma |
is the atttention- or learningparameter. Values
between 0 and 1 are allowed. 1 represents perfect learning.
If |
alpha |
represents the decay. If |
In the original publication TODAM 2 is more complex and has more parameters. Especially the design for the input is a concatenation between item and context. The normal distributed input has a mean = 0 and sd = 1/n. A pragmatic solution to make the models input comparable is to use a binary input like in PASS. There is no explicit argument for noise.
Convolution:
Memory:
Correlation
Murdock, B. B., Smith, D., & Bai, J. (2001). Judgments of frequency and recency in a distributed memory model. Journal of Mathematical Psychology, 45, 564–602. https://doi.org/10.1006/jmps.2000.1339
o1 <- c(-0.27, -0.24, -0.24, 0.75) o2 <- c(-0.06, -0.55, 0.66, -0.06) o3 <- c(0.04, 0.57, -0.65, 0.04) o4 <- c(0.73, -0.39, -0.20, -0.14) TODAM2(o1, o2, o3, o4, gamma = rep(c(0.7, 0.8), 5), alpha = 0.95, sqc = rep(1:4, 4:1))
o1 <- c(-0.27, -0.24, -0.24, 0.75) o2 <- c(-0.06, -0.55, 0.66, -0.06) o3 <- c(0.04, 0.57, -0.65, 0.04) o4 <- c(0.73, -0.39, -0.20, -0.14) TODAM2(o1, o2, o3, o4, gamma = rep(c(0.7, 0.8), 5), alpha = 0.95, sqc = rep(1:4, 4:1))