20 params.
addClassDescription(
"Fast Bayesian inference with the parallel active learning (partly " 21 "inspired from El Gammal et al. 2023).");
23 "sorted_indices",
"The sorted sample indices in order of importance to evaluate the subApp.");
27 "Number of samples to propose in each iteration (not all are sent for subApp evals).");
33 _sorted_indices(getReporterValue<
std::vector<unsigned
int>>(
"sorted_indices")),
34 _num_tries(getParam<unsigned
int>(
"num_tries")),
35 _inputs_test(_num_tries,
std::vector<
Real>(_priors.size())),
40 const std::vector<std::vector<Real>> &
46 const std::vector<Real> &
55 auto fill_vector = [&](std::vector<Real> & vector)
57 for (
unsigned int i = 0; i <
_priors.size(); ++i)
Real random()
Sample a random number between 0 and 1.
Fast Bayesian inference with the parallel active learning (partly inspired from El Gammal et al...
const unsigned int _num_parallel_proposals
Number of parallel proposals to be made and subApps to be executed.
registerMooseObject("StochasticToolsApp", BayesianActiveLearningSampler)
const std::vector< unsigned int > & _sorted_indices
The selected sample indices to evaluate the subApp.
std::vector< const Distribution * > _priors
Storage for prior distribution objects to be utilized.
static InputParameters validParams()
virtual void proposeSamples() override
Fill in the _new_samples vector of vectors (happens within sampleSetUp)
std::vector< Real > _new_var_samples
Vector of new proposed variance samples.
const std::vector< std::vector< Real > > & getSampleTries() const
Return the random samples for the GP to try in the reporter class.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _var_test
Storage for all the proposed variances.
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.
virtual Real quantile(const Real &y) const=0
BayesianActiveLearningSampler(const InputParameters ¶meters)
std::vector< std::vector< Real > > _inputs_test
Storage for all the proposed samples.
const unsigned int & _num_tries
Number of samples to propose in each iteration (not all are sent for subApp evals) ...
void ErrorVector unsigned int
static InputParameters validParams()
A base class used to perform Parallel Markov Chain Monte Carlo (MCMC) sampling.
const std::vector< Real > & getVarSampleTries() const
Return the random variance samples for the GP to try in the reporter class.