sba1/mgsa-bioc — pull request #2 by alyst (2014-10-07 02:02:08+00:00)
Title: Enhance MCMC scheme

PR adds a few enhancements to the MCMC implementation:

1. Re-enable OpenMP support.
2. Randomize initial on/off set states. Currently all chains start from all-off state; the initial states should be sufficiently random to ensure that the chains actually converge to the stationary state (both on/off flags and a,b,p params).
3. Do a burn-in (`burnin` defaults to 1/2 of total steps) to ensure that the chains reach stationary state before the samples collection begins, otherwise the summary statistics would be biased.
4. Sample only every `thin`-th iteration to reduce the samples autocorrelation. In MGSA the MCMC steps are particularly small, so autocorrelation is quite high. That also improves the memory footprint as much less data is stored, while the efficient number of samples remains the same.
5. Introduce `nsamples()` method that returns the number of collected samples for `MgsaResults` (now it has to be used instead of `steps()` for any summary statistics calculation).