update_NIW_belief: Update NIW prior beliefs about multivariate Gaussian category...

update_NIW_belief_by_sufficient_statistics_of_one_categoryR Documentation

Update NIW prior beliefs about multivariate Gaussian category based on sufficient statistics of observations.

Description

Returns updated/posterior beliefs about the Gaussian categories based on conjugate NIW prior.

Usage

update_NIW_belief_by_sufficient_statistics_of_one_category(
  prior,
  x_category,
  x_mean,
  x_SS,
  x_N,
  noise_treatment = if (is.NIW_ideal_adaptor(prior)) {
     if
    (!is.null(first(prior$Sigma_noise))) 
         "marginalize"
     else "no_noise"
 }
    else "no_noise",
  lapse_treatment = if (is.NIW_ideal_adaptor(prior)) "sample" else "no_lapses",
  method = "label-certain",
  verbose = FALSE
)

update_NIW_belief_by_one_observation(
  prior,
  x_category,
  x,
  noise_treatment = if (is.NIW_ideal_adaptor(prior)) {
     if
    (!is.null(first(prior$Sigma_noise))) 
         "marginalize"
     else "no_noise"
 }
    else "no_noise",
  lapse_treatment = if (is.NIW_ideal_adaptor(prior)) "sample" else "no_lapses",
  method = "label-certain",
  verbose = FALSE
)

Arguments

prior

An NIW_belief object, specifying the prior beliefs.

x_category

The category label(s) of one or more observations.

x_mean

The cue mean of observations.

x_SS

*Centered* The sum of squares matrix of observations.

x_N

Number of observations that went into the mean and sum of squares matrix.

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 ideal adaptor specifies a non-zero ‘lapse_rate'), and all observations lead to updating. If "sample" or "marginalize", the lapse rate from ’ the ideal adaptor 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" for NIW_beliefs; "sample" for NIW_ideal_adaptors)

method

Which updating method should be used? See details. (default: "supervised-certain")

verbose

Should more informative output be provided?

x

The cues of single observation.

Details

The priors for the categories are specified through the priors argument, an NIW_belief object. Which category is updated is determined by x_category. Updating proceeds as in \insertCite@see @murphy2012 p. 134;textualMVBeliefUpdatr. The prior kappa and nu will be incremented by the number of observations (x_N). The prior m and S will be updated based on the prior kappa, prior nu, x_N and, of course, the sample mean (x_mean) and sum of squares (x_S) of the observations.

A number of different updating schemes are supported, including supervised updating based on labeled data and unsupervised updating based on unlabeled data. Except for "nolabel-sampling", the unsupervised updating rules were originally presented in \insertCiteyan:jaeger2018;textualMVBeliefUpdatr.

  • "no-updating" doesn't update the prior. Combined with keep_history = T, this allows the creation of baseline against which to compare the updated beliefs. This option is likely most useful when used as part of a call to update_NIW_beliefs_incrementally.

  • "label-certain" assumes that the label is provided and known to the observer with 100 in fully Bayesian supervised belief-updating. This update method is not order sensitive. Under this update method, the order of a batch of observations does not affect the final posterior belief after all observations have been made (it does, of course, effect the beliefs held in the interim). This reflects the "exchangeability" assumption of Bayesian belief-updating under the assumption that the observations are drawn from a stationary random process.

  • "nolabel-criterion" implements a winner-takes-all update based on the prior beliefs. The posterior probability of all categories under the prior is calculated, and only the category with the highest posterior probability is updated (see decision_rule = "criterion" in get_categorization_from_NIW_ideal_adaptor). The update for this category proceed the same ways as under the "label-certain" method. method "nolabel-criterion" is thus order sensitive, but deterministic (i.e., it yields the same result on each repeated run), provided there is no noise (specifically, no noise = "sample").

  • "nolabel-sampling" implements another winner-takes-all update based on the prior beliefs. The posterior probability of all categories under the prior is calculated. Then a single category is sampled based on this posterior (see decision_rule = "sampling" in get_categorization_from_NIW_ideal_adaptor), and only this sampled category is updated with the observation. Like "nolabel-criterion", this updating method is order sensitive. Unlike "nolabel-criterion", this method had a random element and thus does not replicate the same result on each run.

  • "nolabel-proportional" captures the uncertainty about the category label (and is this sense fully Bayesian). The posterior probability of all categories under the prior is calculated (see decision_rule = "proportional" in get_categorization_from_NIW_ideal_adaptor). The input is then distributed across all categories based on their posterior probability under the prior beliefs. That is, all categories are updated, but to different degrees. Like "nolabel-criterion" and "nolabel-sampling", this updating method is order sensitive. Like "nolabel-criterion", it is deterministic.

  • "nolabel-uniform" implements unsupervised updating under maximal uninformed uncertainty. The input is attributed to equal parts to all categories. Like all the "nolabel-*" methods, this updating method is order sensitive. Like "nolabel-criterion" and "nolabel-proportional, it is deterministic. Unlike any of these methods, it completely ignores the knowledge listeners have (i.e., the prior).

Please consider the following important limitations of these functions:

  • the category priors—p(category)—are currently assumed to be uniform. This affects the categorization of the input based on the NIW prior and thus the way that the input observations are distributed across the categories during unsupervised updating.

  • the updating models introduced here treat the cue distributions of the different categories as independent of each other. That is, the updating does not consider knowledge about, for example, the covariance of the category means, although there is evidence that listeners have knowledge of this covariance and draw on it during categorization and adaptation.

Please feel free to suggest additional features.

Value

An NIW_belief object.

References

\insertRef

murphy2012MVBeliefUpdatr

See Also

update_NIW_belief_kappa, update_NIW_belief_nu, update_NIW_belief_m, update_NIW_belief_S, all of which are called by update_NIW_belief_by_sufficient_statistics_of_one_category.


hlplab/MVBeliefUpdatr documentation built on March 29, 2025, 10:42 p.m.