This class implements a weighted mixture of other proposals. More...
#include <MixtureProposal.h>
This class implements a weighted mixture of other proposals.
This class implements proposals of the form
\[ p(x^\prime | x) = \sum_{i=1}^N w_i p_i(x^\prime | x), \]
where \(N\) is the total number of proposal components and \(w_i\) is the weight of the \(i^{th}\) component. Note that the weights must sum to one and are thus normalized after being passed to this class.
The components \(p_i(x^\prime | x)\) can be any other MCMC proposal.
Configuration Parameters:
Parameter Key | Type | Default Value | Description |
---|---|---|---|
"Components" | string | - | A comma separated list with the names of other blocks that define each component in the proposal mixture. |
"Weights" | string | 1.0,1.0,... | A comma separated list of floats defining the weights (potentially unnormalized) for each mixture component. If not specified, even weights are prescribed. |
Definition at line 29 of file MixtureProposal.h.
Public Member Functions | |
MixtureProposal (boost::property_tree::ptree pt, std::shared_ptr< AbstractSamplingProblem > const &prob) | |
MixtureProposal (boost::property_tree::ptree pt, std::shared_ptr< AbstractSamplingProblem > const &prob, std::vector< std::shared_ptr< MCMCProposal >> const &proposals, std::vector< double > const &weights) | |
virtual | ~MixtureProposal ()=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::MixtureProposal::MixtureProposal | ( | boost::property_tree::ptree | pt, |
std::shared_ptr< AbstractSamplingProblem > const & | prob | ||
) |
MixtureProposal::MixtureProposal | ( | boost::property_tree::ptree | pt, |
std::shared_ptr< AbstractSamplingProblem > const & | prob, | ||
std::vector< std::shared_ptr< MCMCProposal >> const & | proposals, | ||
std::vector< double > const & | weights | ||
) |
Definition at line 23 of file MixtureProposal.cpp.
|
virtualdefault |
|
staticprotected |
Constructs the mixture proposals based on properties in the ptree.
Definition at line 46 of file MixtureProposal.cpp.
References muq::SamplingAlgorithms::MCMCProposal::Construct(), muq::SamplingAlgorithms::MCMCProposal::prob, and muq::Utilities::StringUtilities::Split().
|
staticprotected |
Extracts the proposal weights from a ptree.
Definition at line 64 of file MixtureProposal.cpp.
References muq::Utilities::StringUtilities::Split(), and weights.
|
overrideprotectedvirtual |
Implements muq::SamplingAlgorithms::MCMCProposal.
Definition at line 94 of file MixtureProposal.cpp.
|
overrideprotectedvirtual |
Implements muq::SamplingAlgorithms::MCMCProposal.
Definition at line 84 of file MixtureProposal.cpp.
|
protected |
The proposal distribution.
Definition at line 52 of file MixtureProposal.h.
Referenced by LogDensity(), MixtureProposal(), and Sample().
|
protected |
Definition at line 53 of file MixtureProposal.h.
Referenced by GetWeights(), LogDensity(), MixtureProposal(), and Sample().