1 #ifndef EXPENSIVESAMPLINGPROBLEM_H_
2 #define EXPENSIVESAMPLINGPROBLEM_H_
7 #include <parcer/Communicator.h>
15 namespace SamplingAlgorithms {
53 ExpensiveSamplingProblem(std::shared_ptr<muq::Modeling::ModPiece>
const&
target, boost::property_tree::ptree pt, std::shared_ptr<parcer::Communicator> comm);
61 ExpensiveSamplingProblem(std::shared_ptr<muq::Modeling::ModPiece>
const&
target, Eigen::VectorXd
const&
centroid, boost::property_tree::ptree pt, std::shared_ptr<parcer::Communicator> comm);
66 virtual double LogDensity(std::shared_ptr<SamplingState>
const& state)
override;
71 virtual void AddOptions(boost::property_tree::ptree & pt)
const override;
73 virtual std::shared_ptr<SamplingState>
QOI()
override;
81 void SetUp(boost::property_tree::ptree& pt);
91 unsigned int const step,
92 std::shared_ptr<SamplingState>
const& state,
93 std::vector<Eigen::VectorXd>& neighbors,
94 std::vector<Eigen::VectorXd>& results);
104 std::shared_ptr<SamplingState>
const& state,
106 std::vector<Eigen::VectorXd>& neighbors,
107 std::vector<Eigen::VectorXd>& results);
117 Eigen::VectorXd
const& point,
118 unsigned int const index,
119 std::vector<Eigen::VectorXd>& neighbors,
120 std::vector<Eigen::VectorXd>& results);
130 std::shared_ptr<SamplingState>
const& state,
131 std::vector<Eigen::VectorXd>& neighbors,
132 std::vector<Eigen::VectorXd>& results)
const;
156 std::shared_ptr<muq::Approximation::LocalRegression>
reg;
159 std::shared_ptr<muq::Approximation::LocalRegression>
regQoI;
165 std::pair<double, double>
beta;
unsigned int CacheSize() const
std::pair< double, double > beta
Parameters for random refinement.
ExpensiveSamplingProblem(std::shared_ptr< muq::Modeling::ModPiece > const &target, std::shared_ptr< muq::Modeling::ModPiece > const &qoi, boost::property_tree::ptree pt)
unsigned int step
The current step in the MCMC chain.
std::pair< double, double > gamma
Parameters for structural refinement.
unsigned int cumkappa
Cumulative kappa refinements.
virtual ~ExpensiveSamplingProblem()=default
virtual void AddOptions(boost::property_tree::ptree &pt) const override
virtual std::shared_ptr< SamplingState > QOI() override
double lastLyapunov
The Lyapunov function at the most recently accepted point.
std::shared_ptr< muq::Approximation::LocalRegression > regQoI
The regression for the quantity of interest.
double eta
Tail correction parameter.
std::shared_ptr< muq::Approximation::LocalRegression > reg
The regression for the log-likelihood.
unsigned int cumbeta
Cumulative beta refinements.
double lastThreshold
The error threshold at the most recently accepted point.
const Eigen::VectorXd centroid
The centroid of the distribution (input parameter)
virtual double LogDensity(std::shared_ptr< SamplingState > const &state) override
ExpensiveSamplingProblem(std::shared_ptr< muq::Modeling::ModPiece > const &target, Eigen::VectorXd const ¢roid, boost::property_tree::ptree pt)
double RefineSurrogate(unsigned int const step, std::shared_ptr< SamplingState > const &state, std::vector< Eigen::VectorXd > &neighbors, std::vector< Eigen::VectorXd > &results)
void CheckNumNeighbors(std::shared_ptr< SamplingState > const &state)
Check to make sure we have enough model evaluations.
double LogLyapunovFunction(Eigen::VectorXd const &x) const
Estimate the Lyapunov function.
ExpensiveSamplingProblem(std::shared_ptr< muq::Modeling::ModPiece > const &target, std::shared_ptr< muq::Modeling::ModPiece > const &qoi, Eigen::VectorXd const ¢roid, boost::property_tree::ptree pt)
unsigned int level
The current error threshold level.
double ErrorThreshold(Eigen::VectorXd const &x) const
Compute the error threshold.
void SetUp(boost::property_tree::ptree &pt)
Set up the sampling problem.
void CheckNeighbors(std::shared_ptr< SamplingState > const &state, std::vector< Eigen::VectorXd > &neighbors, std::vector< Eigen::VectorXd > &results) const
Check to make sure we have enough model evaluations.
unsigned int cumgamma
Cumulative gamma refinements.
double tau0
The length of the first level.
ExpensiveSamplingProblem(std::shared_ptr< muq::Modeling::ModPiece > const &target, boost::property_tree::ptree pt)
std::pair< double, double > lyapunovPara
The scaling and exponent for the Lyapunov function.
Class for sampling problems based purely on a density function.
std::shared_ptr< muq::Modeling::ModPiece > qoi
std::shared_ptr< muq::Modeling::ModPiece > target
The target distribution (the prior in the inference case)