bilby.bilby_mcmc.proposals.FisherMatrixProposal
- class bilby.bilby_mcmc.proposals.FisherMatrixProposal(priors, subset=None, weight=1, update_interval=100, scale_init=1.0, fd_eps=0.0001, adapt=False)[source]
Bases:
AdaptiveGaussianProposal
- __init__(priors, subset=None, weight=1, update_interval=100, scale_init=1.0, fd_eps=0.0001, adapt=False)[source]
Methods
__init__
(priors[, subset, weight, ...])apply_boundaries
(point)apply_periodic_boundary
(key, val)apply_reflective_boundary
(key, val)check_dependencies
([warn])Check the dependencies required to use the proposal
propose
(chain, likelihood, priors)Propose a new point
update_scale
(chain)The adaptation of the scale follows (35)/(36) of https://arxiv.org/abs/1409.7215
Attributes
acceptance_ratio
accepted
n
Fisher Matrix Proposals
rejected
- static check_dependencies(warn=True)[source]
Check the dependencies required to use the proposal
- Parameters:
- warn: bool
If true, print a warning
- Returns:
- check: bool
If true, dependencies exist
- needs_likelihood_and_priors = True
Fisher Matrix Proposals
Uses a finite differencing approach motivated by BayesWave (see, e.g. https://arxiv.org/abs/1410.3835). The inverse Fisher Information Matrix is calculated from the current sample, then proposals are drawn from a multivariate Gaussian and scaled by an adaptive parameter.
- propose(chain, likelihood, priors)[source]
Propose a new point
This method must be overwritten by implemented proposals. The propose method is called by __call__, then boundaries applied, before returning the proposed point.
- Parameters:
- chain: bilby.core.sampler.bilby_mcmc.chain.Chain
The chain to use for the proposal
- Returns:
- proposal: bilby.core.sampler.bilby_mcmc.Sample
The proposed point
- log_factor: float
The natural-log of the additional factor entering the acceptance probability to ensure detailed balance. For symmetric proposals, a value of 0 should be returned.
- update_scale(chain)[source]
The adaptation of the scale follows (35)/(36) of https://arxiv.org/abs/1409.7215