An implement of the dimension-independent pCN proposal. More...
#include <CrankNicolsonProposal.h>
An implement of the dimension-independent pCN proposal.
This class implements the preconditioned Crank Nicolson proposal (pCN) from Cotter et al., 2013. The proposal takes the form
\[ u^\prime = \bar{u} + \sqrt{ 1 - \beta^2} (u_c-\bar{u}) + \beta z, \]
where \(\bar{u}\) is an estimate of the posterior mean (e.g., the prior mean or posterior MAP), \(u_c\) is the current state of the chain, \(z\sim N(0,C)\) is a normal random variable with a strategically chosen covariance \(C\) (often the prior covariance), and \(u^\prime\) is the propsed point. The parameter \(\beta\) is a tuning parameter.
Configuration Parameters:
Parameter Key | Type | Default Value | Description |
---|---|---|---|
"Beta" | Double | 0.5 | The proposal scaling \(\beta\) defined above. |
"PriorNode" | String | - | (Optional.) If specified, this class assumes the target density was constructed from a WorkGraph and will look set the value of the covariance \(C\) to the covariance of the Gaussian density at the specified node. |
Definition at line 33 of file CrankNicolsonProposal.h.
Public Member Functions | |
CrankNicolsonProposal (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > prob, std::shared_ptr< muq::Modeling::GaussianBase > prior) | |
CrankNicolsonProposal (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > prob) | |
virtual | ~CrankNicolsonProposal ()=default |
Public Member Functions inherited from muq::SamplingAlgorithms::MCMCProposal | |
MCMCProposal (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > const &probIn) | |
virtual | ~MCMCProposal ()=default |
virtual void | Adapt (unsigned int const t, std::vector< std::shared_ptr< SamplingState >> const &state) |
Adapt the proposal after each step. More... | |
void | SetCommunicator (std::shared_ptr< parcer::Communicator > newcomm) |
virtual void | SetBlockInd (int newBlockInd) |
virtual int | GetBlockInd () const |
Additional Inherited Members | |
Public Types inherited from muq::SamplingAlgorithms::MCMCProposal | |
typedef std::function< std::shared_ptr< MCMCProposal >boost::property_tree::ptree, std::shared_ptr< AbstractSamplingProblem >)> | MCMCProposalConstructor |
typedef std::map< std::string, MCMCProposalConstructor > | MCMCProposalMap |
Static Public Member Functions inherited from muq::SamplingAlgorithms::MCMCProposal | |
static std::shared_ptr< MCMCProposal > | Construct (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > const &probIn) |
Static constructor for the transition kernel. More... | |
static std::shared_ptr< MCMCProposalMap > | GetMCMCProposalMap () |
muq::SamplingAlgorithms::CrankNicolsonProposal::CrankNicolsonProposal | ( | boost::property_tree::ptree const & | pt, |
std::shared_ptr< AbstractSamplingProblem > | prob, | ||
std::shared_ptr< muq::Modeling::GaussianBase > | prior | ||
) |
CrankNicolsonProposal::CrankNicolsonProposal | ( | boost::property_tree::ptree const & | pt, |
std::shared_ptr< AbstractSamplingProblem > | prob | ||
) |
Definition at line 25 of file CrankNicolsonProposal.cpp.
References ExtractPrior(), and muq::SamplingAlgorithms::MCMCProposal::prob.
|
virtualdefault |
|
protected |
Definition at line 85 of file CrankNicolsonProposal.cpp.
References priorCovInds, priorCovModel, priorDist, priorMeanInds, priorMeanModel, priorUsesCov, and muq::SamplingAlgorithms::MCMCProposal::prob.
Referenced by CrankNicolsonProposal().
|
protected |
Definition at line 61 of file CrankNicolsonProposal.cpp.
References priorCovInds, priorCovModel, priorMeanInds, and priorMeanModel.
Referenced by LogDensity(), and Sample().
|
overrideprotectedvirtual |
Implements muq::SamplingAlgorithms::MCMCProposal.
Definition at line 48 of file CrankNicolsonProposal.cpp.
References beta, muq::SamplingAlgorithms::MCMCProposal::blockInd, GetPriorInputs(), and priorDist.
|
overrideprotectedvirtual |
Implements muq::SamplingAlgorithms::MCMCProposal.
Definition at line 33 of file CrankNicolsonProposal.cpp.
References beta, muq::SamplingAlgorithms::MCMCProposal::blockInd, GetPriorInputs(), and priorDist.
|
protected |
Definition at line 47 of file CrankNicolsonProposal.h.
Referenced by LogDensity(), and Sample().
|
protected |
Definition at line 54 of file CrankNicolsonProposal.h.
Referenced by ExtractPrior(), and GetPriorInputs().
|
protected |
Definition at line 53 of file CrankNicolsonProposal.h.
Referenced by ExtractPrior(), and GetPriorInputs().
|
protected |
The proposal distribution.
Definition at line 65 of file CrankNicolsonProposal.h.
Referenced by ExtractPrior(), LogDensity(), and Sample().
|
protected |
Definition at line 51 of file CrankNicolsonProposal.h.
Referenced by ExtractPrior(), and GetPriorInputs().
|
protected |
Definition at line 50 of file CrankNicolsonProposal.h.
Referenced by ExtractPrior(), and GetPriorInputs().
|
protected |
Definition at line 55 of file CrankNicolsonProposal.h.
Referenced by ExtractPrior().