update_model_decision_bias_by_one_observation | R Documentation |
Returns model with updated decision biases. This updating process is order-sensitive. For each input observation x, a posterior expectation for each category is obtained based on the specified noise and lapse treatment. This expectation is used to calculate the surprisal (in bits) of the category label x_category. The surprisal is weighted by the learning rate beta to increase the (log-odds of the) decision bias for that category.
update_model_decision_bias_by_one_observation(
model,
beta,
x,
x_category,
noise_treatment = if (!is.null(first(model$Sigma_noise))) "marginalize" else "no_noise",
lapse_treatment = "no_lapses",
update_prior = T,
verbose = F
)
model |
A model object with decision biases. |
beta |
The learning rate with which decision biases change. Might be integrated into model objects in the future. |
x |
The cues of single observation. |
x_category |
The category label(s) of one or more observations. |
noise_treatment |
Determines whether perceptual noise is considered during categorization, and how. Can be "no_noise", "sample", or "marginalize". If "no_noise", no noise will be applied to the input, and no noise will be assumed during categorization. If "marginalize", average noise (i.e., no noise) will be added to the stimulus, and 'Sigma_noise' is added to Sigma when calculating the likelihood. This simulates the expected consequences for perceptual noise on categorization *in the limit*, i.e, if the input was categorized infinitely many times. If "sample", then noise is sampled and applied to the input, and 'Sigma_noise' is added to Sigma when calculating the likelihood. This simulates the consequence of perceptual noise *on a particular observation*. If "sample" or "marginalize" are chosen, 'Sigma_noise' must be a covariance matrix of appropriate dimensions. (default: "no_noise" if Sigma_noise is NULL, "marginalize" otherwise). |
lapse_treatment |
Determines whether attentional lapses can occur during which no updating occurs. Can be "no_lapses", "sample", or "marginalize". If "no_lapses", no lapses occur (even if the model specifies a non-zero ‘lapse_rate'), and all observations lead to updating. If "sample" or "marginalize", the lapse rate from ’ the model will be used. For "sample", sampling determines for each observation whether it was a lapse or not. If an observation was a lapse no updating occurs. For "marginalize", 1 - lapse_rate is the proportion of observations that are assumed to be lapsing trials (default: "no_lapses") |
update_prior |
Should the prior probability of each category be updated along with the decision bias? |
verbose |
Should more informative output be provided? |
A model object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.