#include <MCMCProposal.h>
Definition at line 36 of file MCMCProposal.h.
Public Types | |
typedef std::function< std::shared_ptr< MCMCProposal >boost::property_tree::ptree, std::shared_ptr< AbstractSamplingProblem >)> | MCMCProposalConstructor |
typedef std::map< std::string, MCMCProposalConstructor > | MCMCProposalMap |
Public Member Functions | |
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... | |
virtual std::shared_ptr< SamplingState > | Sample (std::shared_ptr< SamplingState > const ¤tState)=0 |
virtual double | LogDensity (std::shared_ptr< SamplingState > const &currState, std::shared_ptr< SamplingState > const &propState)=0 |
void | SetCommunicator (std::shared_ptr< parcer::Communicator > newcomm) |
virtual void | SetBlockInd (int newBlockInd) |
virtual int | GetBlockInd () const |
Static Public Member Functions | |
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 () |
typedef std::function<std::shared_ptr<MCMCProposal>boost::property_tree::ptree,std::shared_ptr<AbstractSamplingProblem>)> muq::SamplingAlgorithms::MCMCProposal::MCMCProposalConstructor |
Definition at line 53 of file MCMCProposal.h.
typedef std::map<std::string, MCMCProposalConstructor> muq::SamplingAlgorithms::MCMCProposal::MCMCProposalMap |
Definition at line 54 of file MCMCProposal.h.
MCMCProposal::MCMCProposal | ( | boost::property_tree::ptree const & | pt, |
std::shared_ptr< AbstractSamplingProblem > const & | probIn | ||
) |
Definition at line 7 of file MCMCProposal.cpp.
|
virtualdefault |
|
inlinevirtual |
Adapt the proposal after each step.
By default this function does nothing but children can override it to adapt the proposal
[in] | t | The current step |
[in] | state | The current state |
Reimplemented in muq::SamplingAlgorithms::ParallelAMProposal, and muq::SamplingAlgorithms::AMProposal.
Definition at line 63 of file MCMCProposal.h.
|
static |
Static constructor for the transition kernel.
[in] | pt | The options for the MCMC kernel |
Definition at line 12 of file MCMCProposal.cpp.
References GetMCMCProposalMap(), and prob.
Referenced by muq::SamplingAlgorithms::DRKernel::CreateProposals(), muq::SamplingAlgorithms::MixtureProposal::GetProposals(), and muq::SamplingAlgorithms::DefaultComponentFactory::Proposal().
|
inlinevirtual |
Definition at line 76 of file MCMCProposal.h.
References blockInd.
|
static |
Definition at line 34 of file MCMCProposal.cpp.
Referenced by Construct().
|
pure virtual |
Implemented in muq::SamplingAlgorithms::SubsamplingMIProposal, muq::SamplingAlgorithms::SMMALAProposal, muq::SamplingAlgorithms::MixtureProposal, muq::SamplingAlgorithms::MHProposal, muq::SamplingAlgorithms::MALAProposal, muq::SamplingAlgorithms::InverseGammaProposal, muq::SamplingAlgorithms::InfMALAProposal, muq::SamplingAlgorithms::IndependenceProposal, muq::SamplingAlgorithms::CrankNicolsonProposal, muq::SamplingAlgorithms::AMProposal, and muq::SamplingAlgorithms::RemoteMIProposal.
|
pure virtual |
Implemented in muq::SamplingAlgorithms::SubsamplingMIProposal, muq::SamplingAlgorithms::SMMALAProposal, muq::SamplingAlgorithms::MixtureProposal, muq::SamplingAlgorithms::MHProposal, muq::SamplingAlgorithms::MALAProposal, muq::SamplingAlgorithms::InverseGammaProposal, muq::SamplingAlgorithms::InfMALAProposal, muq::SamplingAlgorithms::IndependenceProposal, muq::SamplingAlgorithms::CrankNicolsonProposal, muq::SamplingAlgorithms::AMProposal, and muq::SamplingAlgorithms::RemoteMIProposal.
|
inlinevirtual |
Definition at line 75 of file MCMCProposal.h.
References blockInd.
void MCMCProposal::SetCommunicator | ( | std::shared_ptr< parcer::Communicator > | newcomm | ) |
Definition at line 47 of file MCMCProposal.cpp.
References comm.
|
protected |
Definition at line 79 of file MCMCProposal.h.
Referenced by muq::SamplingAlgorithms::AMProposal::Adapt(), GetBlockInd(), muq::SamplingAlgorithms::InfMALAProposal::GetSigmaGrad(), muq::SamplingAlgorithms::AMProposal::LogDensity(), muq::SamplingAlgorithms::CrankNicolsonProposal::LogDensity(), muq::SamplingAlgorithms::IndependenceProposal::LogDensity(), muq::SamplingAlgorithms::InfMALAProposal::LogDensity(), muq::SamplingAlgorithms::InverseGammaProposal::LogDensity(), muq::SamplingAlgorithms::MALAProposal::LogDensity(), muq::SamplingAlgorithms::MHProposal::LogDensity(), muq::SamplingAlgorithms::SMMALAProposal::LogDensity(), muq::SamplingAlgorithms::AMProposal::Sample(), muq::SamplingAlgorithms::CrankNicolsonProposal::Sample(), muq::SamplingAlgorithms::IndependenceProposal::Sample(), muq::SamplingAlgorithms::InfMALAProposal::Sample(), muq::SamplingAlgorithms::InverseGammaProposal::Sample(), muq::SamplingAlgorithms::MALAProposal::Sample(), muq::SamplingAlgorithms::MHProposal::Sample(), muq::SamplingAlgorithms::SMMALAProposal::Sample(), and SetBlockInd().
|
protected |
Definition at line 84 of file MCMCProposal.h.
Referenced by muq::SamplingAlgorithms::ParallelAMProposal::Adapt(), and SetCommunicator().
|
protected |
Definition at line 81 of file MCMCProposal.h.
Referenced by Construct(), muq::SamplingAlgorithms::AMProposal::ConstructCovariance(), muq::SamplingAlgorithms::CrankNicolsonProposal::CrankNicolsonProposal(), muq::SamplingAlgorithms::InverseGammaProposal::ExtractAlpha(), muq::SamplingAlgorithms::InverseGammaProposal::ExtractBeta(), muq::SamplingAlgorithms::IndependenceProposal::ExtractDistribution(), muq::SamplingAlgorithms::InverseGammaProposal::ExtractGaussInfo(), muq::SamplingAlgorithms::InverseGammaProposal::ExtractInverseGamma(), muq::SamplingAlgorithms::InverseGammaProposal::ExtractMean(), muq::SamplingAlgorithms::CrankNicolsonProposal::ExtractPrior(), muq::SamplingAlgorithms::InverseGammaProposal::ExtractVarianceModel(), muq::SamplingAlgorithms::MixtureProposal::GetProposals(), muq::SamplingAlgorithms::InfMALAProposal::GetSigmaGrad(), muq::SamplingAlgorithms::MALAProposal::LogDensity(), muq::SamplingAlgorithms::SMMALAProposal::LogDensity(), muq::SamplingAlgorithms::MALAProposal::Sample(), and muq::SamplingAlgorithms::SMMALAProposal::Sample().