Commit 12ed7424 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Adds tswap acceptance fractions

parent d32bb2b9
......@@ -689,6 +689,9 @@ class MCMCSearch(BaseSearchClass):
sampler.run_mcmc(p0, n)
logging.info("Mean acceptance fraction: {0:.3f}"
.format(np.mean(sampler.acceptance_fraction)))
if self.ntemps > 1:
logging.info("Tswap acceptance fraction: {}"
.format(sampler.tswap_acceptance_fraction))
fig, axes = self.plot_walkers(sampler, symbols=self.theta_symbols)
fig.savefig('{}/{}_init_{}_walkers.png'.format(
self.outdir, self.label, j))
......@@ -705,6 +708,9 @@ class MCMCSearch(BaseSearchClass):
sampler.run_mcmc(p0, nburn+nprod)
logging.info("Mean acceptance fraction: {0:.3f}"
.format(np.mean(sampler.acceptance_fraction)))
if self.ntemps > 1:
logging.info("Tswap acceptance fraction: {}"
.format(sampler.tswap_acceptance_fraction))
fig, axes = self.plot_walkers(sampler, symbols=self.theta_symbols)
fig.savefig('{}/{}_walkers.png'.format(self.outdir, self.label))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment