20 "previous_state",
"Reporter value with the previous state of all the walkers.");
23 "Reporter value with the previous state of all the walkers for variance.");
24 params.
addParam<
Real>(
"step_size", 2.0,
"Step size for each of the walkers.");
30 _step_size(getParam<
Real>(
"step_size")),
31 _previous_state(getReporterValue<
std::vector<
std::vector<
Real>>>(
"previous_state")),
32 _previous_state_var(getReporterValue<
std::vector<
Real>>(
"previous_state_var"))
36 "At least three parallel proposals should be used for the Stretch Sampler.");
40 "It is recommended that the parallel proposals be greater than or equal to the " 41 "inferred parameters. This will allow the sampler to not get stuck on a hyper-plane.");
52 unsigned int index_req = 0;
58 for (
unsigned int i = 0; i <
_priors.size(); ++i)
86 const std::vector<Real> &
const unsigned int _num_parallel_proposals
Number of parallel proposals to be made and subApps to be executed.
const std::vector< Real > * _lower_bound
Lower bounds for making the next proposal.
virtual int decisionStep() const override
Return the step after which decision making can begin.
std::vector< Real > _affine_step
Vector of affine step sizes.
std::vector< const Distribution * > _priors
Storage for prior distribution objects to be utilized.
AffineInvariantStretchSampler(const InputParameters ¶meters)
const std::vector< Real > & getAffineStepSize() const
Return the vector of step size for decision making.
Real getRand(unsigned int index=0)
void mooseWarning(Args &&... args) const
const std::vector< std::vector< Real > > & _previous_state
Reporter value with the previous state of all the walkers.
registerMooseObject("StochasticToolsApp", AffineInvariantStretchSampler)
A class for performing Affine Invariant Ensemble MCMC with stretch sampler.
std::vector< Real > _new_var_samples
Vector of new proposed variance samples.
virtual void proposeSamples(const unsigned int seed_value) override
Fill in the _new_samples vector of vectors (happens within sampleSetUp)
const Real _step_size
The step size for the stretch sampler.
void paramError(const std::string ¶m, Args... args) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< Real > & _previous_state_var
Reporter value with the previous state of all the walkers for variance.
std::vector< std::vector< Real > > _new_samples
Vectors of new proposed samples.
const Distribution * _var_prior
Storage for prior distribution object of the variance to be utilized.
static InputParameters validParams()
void randomIndex(const unsigned int &upper_bound, const unsigned int &exclude, const unsigned int &seed, unsigned int &req_index)
Sample a random index excluding a specified index.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual Real quantile(const Real &y) const=0
static InputParameters validParams()
A base class used to perform Parallel Markov Chain Monte Carlo (MCMC) sampling.