Skip to content
Snippets Groups Projects

Improve ptemcee

Merged Gregory Ashton requested to merge improve-ptemcee into master
Compare and Show latest version
1 file
+ 10
5
Compare changes
  • Side-by-side
  • Inline
@@ -49,9 +49,9 @@ class Ptemcee(MCMCSampler):
The requested number of samples. Note, in cases where the
autocorrelation parameter is difficult to measure, it is possible to
end up with more than nsamples.
burn_in_act, thin_by_nact: int, (50, 1)
burn_in_nact, thin_by_nact: int, (50, 1)
The number of burn-in autocorrelation times to discard and the thin-by
factor. Increasing burn_in_act increases the time required for burn-in.
factor. Increasing burn_in_nact increases the time required for burn-in.
Increasing thin_by_nact increases the time required to obtain nsamples.
autocorr_tol: int, (50)
The minimum number of autocorrelation times needed to trust the
@@ -130,8 +130,8 @@ class Ptemcee(MCMCSampler):
skip_import_verification=False,
resume=True,
nsamples=5000,
burn_in_nact=50,
thin_by_nact=1,
burn_in_nact=10,
thin_by_nact=0.5,
autocorr_tol=50,
autocorr_c=5,
safety=1,
@@ -892,7 +892,12 @@ def init(likelihood_in, priors_in):
class LikePriorEvaluator(object):
"""
A overwrite of the ptemcee.LikePriorEvaluator to use bilby likelihood and priors
This class is copied and modified from ptemcee.LikePriorEvaluator, see
https://github.com/willvousden/ptemcee for the original version
We overwrite the logl and logp methods in order to improve the performance
when using a MultiPool object: essentially reducing the amount of data
transfer overhead.
"""
Loading