7 SamplingProblem::SamplingProblem(std::shared_ptr<muq::Modeling::ModPiece>
const& targetIn) :
AbstractSamplingProblem(targetIn->inputSizes),
12 std::shared_ptr<muq::Modeling::ModPiece>
const& qoiIn) :
AbstractSamplingProblem(targetIn->inputSizes,qoiIn->outputSizes),
22 return target->Evaluate(state->state).at(0)(0);
31 return std::make_shared<SamplingState>(
qoi->Evaluate(
lastState->state));
35 unsigned const blockWrt)
37 return target->Gradient(0,blockWrt, state->state, Eigen::VectorXd::Ones(1).eval());
46 output.at(i) =
target->inputSizes(i);
Abstract base class for MCMC and Importance Sampling problems.
virtual Eigen::VectorXd GradLogDensity(std::shared_ptr< SamplingState > const &state, unsigned const blockWrt) override
std::shared_ptr< muq::Modeling::ModPiece > qoi
std::shared_ptr< muq::Modeling::ModPiece > target
The target distribution (the prior in the inference case)
virtual double LogDensity(std::shared_ptr< SamplingState > const &state) override
static std::vector< int > GetBlockSizes(std::shared_ptr< muq::Modeling::ModPiece > const &target)
SamplingProblem(std::shared_ptr< muq::Modeling::ModPiece > const &targetIn)
std::shared_ptr< SamplingState > lastState
virtual std::shared_ptr< SamplingState > QOI() override