Skip to content
Snippets Groups Projects
Commit 12ed7424 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Adds tswap acceptance fractions

parent d32bb2b9
No related branches found
No related tags found
No related merge requests found
...@@ -689,6 +689,9 @@ class MCMCSearch(BaseSearchClass): ...@@ -689,6 +689,9 @@ class MCMCSearch(BaseSearchClass):
sampler.run_mcmc(p0, n) sampler.run_mcmc(p0, n)
logging.info("Mean acceptance fraction: {0:.3f}" logging.info("Mean acceptance fraction: {0:.3f}"
.format(np.mean(sampler.acceptance_fraction))) .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, axes = self.plot_walkers(sampler, symbols=self.theta_symbols)
fig.savefig('{}/{}_init_{}_walkers.png'.format( fig.savefig('{}/{}_init_{}_walkers.png'.format(
self.outdir, self.label, j)) self.outdir, self.label, j))
...@@ -705,6 +708,9 @@ class MCMCSearch(BaseSearchClass): ...@@ -705,6 +708,9 @@ class MCMCSearch(BaseSearchClass):
sampler.run_mcmc(p0, nburn+nprod) sampler.run_mcmc(p0, nburn+nprod)
logging.info("Mean acceptance fraction: {0:.3f}" logging.info("Mean acceptance fraction: {0:.3f}"
.format(np.mean(sampler.acceptance_fraction))) .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, axes = self.plot_walkers(sampler, symbols=self.theta_symbols)
fig.savefig('{}/{}_walkers.png'.format(self.outdir, self.label)) fig.savefig('{}/{}_walkers.png'.format(self.outdir, self.label))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment