Check whether HGF parameter estimation works using simulations where the ground truth is known
This is to replicate Figure 7 of Mathys et al. (2014) for the BFGS algorithm as implemented in the HGF Toolbox. The priors used are close to those in that paper, however some differences remain:
- omega is now omega_2
- kappa is now kappa_2 and is estimated in log-space instead of logit-space
- theta is now exp(omega_3), which is estimated in log-space
This is intended to run on ETH's Euler cluster. However, with a few straightforward modifications to simulate_estimate.sh
, it can be run on any platform that has Bash and Matlab.
Entering
$ ./simulate_estimate.sh sims 256
at the shell prompt will give you 256 estimations per cell of your zeta/kappa grid, structured in a directory tree under the top-level directory sims
. The first level of the tree contains directories named by zeta value, the second level by kappa value. The files containing the estimated kappa value are called ka{1..256}
. A log file for each kappa's job is provided in job{1..256}.log
. In order to have all estimated kappas in one text file for each grid cell, you can run
$ ./gather_kas.sh sims
This allows you to continue in Matlab by running (in the same directory)
>> gather_kas('sims');
>> load('kas.mat');
>> plot_kas(kas);
This gives you a plot of your estimates like this one here: