Description Usage Arguments Value See Also Examples
Update beliefs in a data frame in batches
1 | belief_update_batch(d, cue, categories, trials, at, beliefs)
|
d |
Data frame with cue values and categories |
cue |
Quoted name of column of data frame with cue values |
categories |
Quoted name of column with known category labels. |
trials |
Quoted name of column with trial numbers to define batches |
at |
Trial numbers to get updated beliefs |
beliefs |
Named list of starting belief NIX^2 parameters. Names must
match unique values of |
A data_frame with updated NIX2 parameters in beliefs
for the
values of d[[trials]]
from at
. d$beliefs
is a list
column where each element is a named list of category belief parameters
belief_update
for fully incremental,
observation-by-observation belief updating.
1 2 3 4 5 6 | d <- data.frame(x = rnorm(100, 3),
c = sample(c('a', 'b'), 100, replace=TRUE),
trial = 1:100)
belief_update_batch(d, 'x', 'c', 'trial', seq(10, 100, by=10),
list(a = nix2_params(0, 0, 10, 10),
b = nix2_params(0, 0, 10, 10)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.