`infer_lcm.Rd`

`infer_lcm`

conduct local maximum a posteriori inference for latent cause model of associative learning

infer_lcm(X, opts)

X | matrix of stimulus inputs consisting of the number of trial rows and the number of stimulus features columns. The first feature (column 1) is the US, and the rest of the features (column 2 through D) are CSs. US Unconditioned Stimulus CS Conditioned Stimului or Context. If using multiple CS, set variables name as CS1,CS2,CS3... |
---|---|

opts | (optional)options used in inference a hyperparameter of beta prior(default = 1) b hyperparameter of beta prior(default = 1) c_alpha concentration parameter for Chinese restaurant process prior(default = 1) stickiness stickiness parameer for Chinese restaurant process prior(default = 0) K maximum number of latent causes(default = 10) |

opts: options used in inference

V: US prediction each trial

post: matrix of latent cause posterior consisting of the number of trial rows and the probability of latent cause k being active on trial t, after observing the all the features. K (the number of latent causes) is determined adaptively by the model.

# results <- infer_lcm(X,opts)