MUQ  0.4.3
muq::SamplingAlgorithms::ImportanceSampling Class Reference

Defines an imporance sampline sampler. More...

#include <ImportanceSampling.h>

Inheritance diagram for muq::SamplingAlgorithms::ImportanceSampling:

Detailed Description

Defines an imporance sampline sampler.

Configuration Parameters:

Parameter Key Type Default Value Description
"NumSamples" Int - The total number of steps (including burnin) to take, i.e., the length of the Markov chain.

Definition at line 22 of file ImportanceSampling.h.

Public Member Functions

 ImportanceSampling (std::shared_ptr< muq::Modeling::Distribution > const &target, boost::property_tree::ptree const &pt)
 
 ImportanceSampling (std::shared_ptr< muq::Modeling::ModPiece > const &target, std::shared_ptr< muq::Modeling::Distribution > const &bias, boost::property_tree::ptree const &pt)
 
 ImportanceSampling (std::shared_ptr< muq::Modeling::ModPiece > const &target, std::shared_ptr< muq::Modeling::Distribution > const &bias, std::vector< Eigen::VectorXd > hyperparameters, boost::property_tree::ptree const &pt)
 
 ImportanceSampling (std::shared_ptr< muq::Modeling::Distribution > const &target, std::vector< Eigen::VectorXd > hyperparameters, boost::property_tree::ptree const &pt)
 
virtual ~ImportanceSampling ()=default
 
- Public Member Functions inherited from muq::SamplingAlgorithms::SamplingAlgorithm
 SamplingAlgorithm (std::shared_ptr< SampleCollection > const &samples)
 
 SamplingAlgorithm (std::shared_ptr< SampleCollection > const &samplesIn, std::shared_ptr< SampleCollection > const &QOIsIn)
 
 SamplingAlgorithm (std::shared_ptr< SampleCollection > const &samplesIn, std::shared_ptr< parcer::Communicator > const &comm)
 
virtual ~SamplingAlgorithm ()=default
 
virtual std::shared_ptr< SampleCollectionGetSamples () const
 
virtual std::shared_ptr< SampleCollectionGetQOIs () const
 
virtual void SetState (std::vector< Eigen::VectorXd > const &x0)
 
virtual std::shared_ptr< SampleCollectionRun (std::vector< Eigen::VectorXd > const &x0=std::vector< Eigen::VectorXd >())
 
template<typename... Args>
std::shared_ptr< SampleCollectionRun (Args const &... args)
 
std::shared_ptr< parcer::Communicator > GetCommunicator () const
 

Constructor & Destructor Documentation

◆ ImportanceSampling() [1/4]

ImportanceSampling::ImportanceSampling ( std::shared_ptr< muq::Modeling::Distribution > const &  target,
boost::property_tree::ptree const &  pt 
)

Use the target distribution as the baising distribution. This is equivalent to Monte Carlo

Parameters
[in]targetThe target distribution
[in]ptOptions for the importance sampler

Definition at line 11 of file ImportanceSampling.cpp.

◆ ImportanceSampling() [2/4]

muq::SamplingAlgorithms::ImportanceSampling::ImportanceSampling ( std::shared_ptr< muq::Modeling::ModPiece > const &  target,
std::shared_ptr< muq::Modeling::Distribution > const &  bias,
boost::property_tree::ptree const &  pt 
)
Parameters
[in]targetThe target distribution
[in]biasThe biasing distribution
[in]ptOptions for the importance sampler

◆ ImportanceSampling() [3/4]

muq::SamplingAlgorithms::ImportanceSampling::ImportanceSampling ( std::shared_ptr< muq::Modeling::ModPiece > const &  target,
std::shared_ptr< muq::Modeling::Distribution > const &  bias,
std::vector< Eigen::VectorXd >  hyperparameters,
boost::property_tree::ptree const &  pt 
)
Parameters
[in]targetThe target distribution
[in]biasThe biasing distribution
[in]hyperparametersHyperparameters for the biasing distribution
[in]ptOptions for the importance sampler

◆ ImportanceSampling() [4/4]

muq::SamplingAlgorithms::ImportanceSampling::ImportanceSampling ( std::shared_ptr< muq::Modeling::Distribution > const &  target,
std::vector< Eigen::VectorXd >  hyperparameters,
boost::property_tree::ptree const &  pt 
)
Parameters
[in]targetThe target distribution
[in]hyperparametersHyperparameters for the biasing distribution
[in]ptOptions for the importance sampler

◆ ~ImportanceSampling()

virtual muq::SamplingAlgorithms::ImportanceSampling::~ImportanceSampling ( )
virtualdefault

Member Function Documentation

◆ RunImpl()

std::shared_ptr< SampleCollection > ImportanceSampling::RunImpl ( std::vector< Eigen::VectorXd > const &  x0)
overrideprivatevirtual

Member Data Documentation

◆ bias

std::shared_ptr<muq::Modeling::Distribution> muq::SamplingAlgorithms::ImportanceSampling::bias
private

The biasing distribution.

Definition at line 67 of file ImportanceSampling.h.

Referenced by RunImpl().

◆ hyperparameters

const std::vector<Eigen::VectorXd> muq::SamplingAlgorithms::ImportanceSampling::hyperparameters = std::vector<Eigen::VectorXd>()
private

Hyperparameters for the biasing distribution.

Definition at line 70 of file ImportanceSampling.h.

Referenced by RunImpl().

◆ numSamps

const unsigned int muq::SamplingAlgorithms::ImportanceSampling::numSamps
private

The number of samples.

Definition at line 61 of file ImportanceSampling.h.

Referenced by RunImpl().

◆ target

std::shared_ptr<muq::Modeling::ModPiece> muq::SamplingAlgorithms::ImportanceSampling::target
private

Definition at line 64 of file ImportanceSampling.h.

Referenced by RunImpl().


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