MUQ  0.4.3
muq::SamplingAlgorithms::SubsamplingMIProposal Class Reference

Subsampling Multiindex proposal. More...

#include <SubsamplingMIProposal.h>

Inheritance diagram for muq::SamplingAlgorithms::SubsamplingMIProposal:

Detailed Description

Subsampling Multiindex proposal.

This proposal draws samples from a given chain, applying a given amount of subsampling. If necessary not enough samples are available, new ones are drawn in the chain.

Definition at line 20 of file SubsamplingMIProposal.h.

Public Member Functions

 SubsamplingMIProposal (pt::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > prob, std::shared_ptr< muq::Utilities::MultiIndex > coarseIndex, std::shared_ptr< SingleChainMCMC > coarseChain)
 
virtual std::shared_ptr< SamplingStateSample (std::shared_ptr< SamplingState > const &currentState) override
 
virtual double LogDensity (std::shared_ptr< SamplingState > const &currState, std::shared_ptr< SamplingState > const &propState) override
 
- 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, MCMCProposalConstructorMCMCProposalMap
 
- Static Public Member Functions inherited from muq::SamplingAlgorithms::MCMCProposal
static std::shared_ptr< MCMCProposalConstruct (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > const &probIn)
 Static constructor for the transition kernel. More...
 
static std::shared_ptr< MCMCProposalMapGetMCMCProposalMap ()
 

Constructor & Destructor Documentation

◆ SubsamplingMIProposal()

muq::SamplingAlgorithms::SubsamplingMIProposal::SubsamplingMIProposal ( pt::ptree const &  pt,
std::shared_ptr< AbstractSamplingProblem prob,
std::shared_ptr< muq::Utilities::MultiIndex >  coarseIndex,
std::shared_ptr< SingleChainMCMC coarseChain 
)

Definition at line 5 of file SubsamplingMIProposal.cpp.

Member Function Documentation

◆ LogDensity()

double muq::SamplingAlgorithms::SubsamplingMIProposal::LogDensity ( std::shared_ptr< SamplingState > const &  currState,
std::shared_ptr< SamplingState > const &  propState 
)
overridevirtual

Implements muq::SamplingAlgorithms::MCMCProposal.

Definition at line 22 of file SubsamplingMIProposal.cpp.

◆ multiindexToConfigString()

std::string muq::SamplingAlgorithms::SubsamplingMIProposal::multiindexToConfigString ( std::shared_ptr< muq::Utilities::MultiIndex >  index)
private

Definition at line 27 of file SubsamplingMIProposal.cpp.

◆ Sample()

std::shared_ptr< SamplingState > muq::SamplingAlgorithms::SubsamplingMIProposal::Sample ( std::shared_ptr< SamplingState > const &  currentState)
overridevirtual

Implements muq::SamplingAlgorithms::MCMCProposal.

Definition at line 11 of file SubsamplingMIProposal.cpp.

References coarseChain, sampleID, and subsampling.

Member Data Documentation

◆ coarseChain

std::shared_ptr<SingleChainMCMC> muq::SamplingAlgorithms::SubsamplingMIProposal::coarseChain
private

Definition at line 32 of file SubsamplingMIProposal.h.

Referenced by Sample().

◆ sampleID

int muq::SamplingAlgorithms::SubsamplingMIProposal::sampleID = 0
private

Definition at line 33 of file SubsamplingMIProposal.h.

Referenced by Sample().

◆ sampleWeight

int muq::SamplingAlgorithms::SubsamplingMIProposal::sampleWeight = 0
private

Definition at line 34 of file SubsamplingMIProposal.h.

◆ subsampling

const int muq::SamplingAlgorithms::SubsamplingMIProposal::subsampling
private

Definition at line 35 of file SubsamplingMIProposal.h.

Referenced by Sample().


The documentation for this class was generated from the following files: