Category: MCMC
-
Gibbs sampler in Matlab using mexme
Darren Wilkinson has a nice post up comparing different programming languages (C, Java, scala, Python, and R) for writing Gibbs samplers. Unsurprisingly, C is fastest, although it is certainly not the easiest language to program in. In particular, I/O is a bitch. Others have suggested an interesting solution: write the core of the Gibbs sampler…
-
Gibbs sampling made easy – JAGS, RKWard, CODA
I’ve used OpenBUGS for Gibbs sampling in the past, and while it’s a powerful piece of software, I hate OpenBUGS’ GUI, especially since it runs only on Windows. JAGS is an alternative Gibbs sampling program that uses an OpenBUGS-like syntax and runs on the command line. You can call JAGS in R through the rjags…
-
Programming for multi-core environments
CPUs with multiple cores are currently the norm. Getting optimal performance out of these systems is challenging. I recently read Parallel Programming in C with MPI and OpenMP by Michael Quinn, a book that, while released in 2004, remains relevant and actual. Dr. Quinn introduces two technologies which are available in C (and in Fortran…
-
Hierarchical Bayes and WinBUGS for tracking receptive fields
I’ve been reading Bayesian Modeling Using WinBUGS: An introduction. It’s a really nice intro to fitting complex Bayesian models with WinBUGS (aka OpenBUGS), which is a program that can sample from the posterior distribution of a Bayesian model’s parameters using MCMC methods (the GS in BUGS stands for Gibbs sampling). MCMC methods are very general,…