MUQ  0.4.3
ImportanceSampling.h
Go to the documentation of this file.
1 #ifndef IMPORTANCESAMPLING_H_
2 #define IMPORTANCESAMPLING_H_
3 
4 #include <boost/property_tree/ptree.hpp>
5 
8 
10 
11 namespace muq {
12  namespace SamplingAlgorithms {
23  public:
24 
30  ImportanceSampling(std::shared_ptr<muq::Modeling::Distribution> const& target, boost::property_tree::ptree const& pt);
31 
37  ImportanceSampling(std::shared_ptr<muq::Modeling::ModPiece> const& target, std::shared_ptr<muq::Modeling::Distribution> const& bias, boost::property_tree::ptree const& pt);
38 
45  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);
46 
52  ImportanceSampling(std::shared_ptr<muq::Modeling::Distribution> const& target, std::vector<Eigen::VectorXd> hyperparameters, boost::property_tree::ptree const& pt);
53 
54  virtual ~ImportanceSampling() = default;
55 
56  private:
57 
58  virtual std::shared_ptr<SampleCollection> RunImpl(std::vector<Eigen::VectorXd> const& x0) override;
59 
61  const unsigned int numSamps;
62 
63  // The target density
64  std::shared_ptr<muq::Modeling::ModPiece> target;
65 
67  std::shared_ptr<muq::Modeling::Distribution> bias;
68 
70  const std::vector<Eigen::VectorXd> hyperparameters = std::vector<Eigen::VectorXd>();
71  };
72  } // namespace SamplingAlgorithms
73 } // namespace muq
74 
75 #endif
Defines an imporance sampline sampler.
const unsigned int numSamps
The number of samples.
std::shared_ptr< muq::Modeling::Distribution > bias
The biasing distribution.
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::Distribution > const &target, boost::property_tree::ptree const &pt)
virtual std::shared_ptr< SampleCollection > RunImpl(std::vector< Eigen::VectorXd > const &x0) override
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)
const std::vector< Eigen::VectorXd > hyperparameters
Hyperparameters for the biasing distribution.
ImportanceSampling(std::shared_ptr< muq::Modeling::Distribution > const &target, std::vector< Eigen::VectorXd > hyperparameters, boost::property_tree::ptree const &pt)
std::shared_ptr< muq::Modeling::ModPiece > target