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