22 "num_parallel_proposals",
23 "Number of proposals to make and corresponding subApps executed in " 27 "The distribution names to be sampled, the number of distributions provided defines the " 28 "number of columns per matrix.");
30 "sorted_indices",
"The sorted sample indices in order of importance to evaluate the subApp.");
34 "Number of samples to propose in each iteration (not all are sent for subApp evals).");
36 "The starting values of the inputs to be calibrated.");
40 "Initialize a certain number of random seeds. Change from the default only if you have to.");
47 _num_parallel_proposals(getParam<unsigned
int>(
"num_parallel_proposals")),
48 _sorted_indices(getReporterValue<
std::vector<unsigned
int>>(
"sorted_indices")),
49 _initial_values(getParam<
std::vector<
Real>>(
"initial_values")),
50 _num_tries(getParam<unsigned
int>(
"num_tries"))
53 for (
const DistributionName &
name :
getParam<std::vector<DistributionName>>(
"distributions"))
70 const std::vector<std::vector<Real>> &
79 std::size_t rand_index = 0;
80 auto fill_vector = [&](std::vector<Real> & vector)
void setNumberOfRows(dof_id_type n_rows)
const std::vector< unsigned int > & _sorted_indices
The selected sample indices to evaluate the subApp.
static InputParameters validParams()
const T & getParam(const std::string &name) const
const std::vector< std::vector< Real > > & getSampleTries() const
Return random samples for the GP to try in the reporter class.
const std::string & name() const
Real getRand(std::size_t n, unsigned int index=0) const
virtual void executeSetUp() override
Gather all the samples.
const std::vector< Real > & _initial_values
Initial values of the input params to get the MCMC scheme started.
GenericActiveLearningSampler(const InputParameters ¶meters)
dof_id_type getNumberOfRows() const
const Distribution & getDistributionByName(const DistributionName &name) const
void setAutoAdvanceGenerators(const bool state)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setNumberOfCols(dof_id_type n_cols)
const unsigned int _num_parallel_proposals
Number of parallel proposals to be made and subApps to be executed.
A generic sampler to support parallel active learning.
IntRange< T > make_range(T beg, T end)
static InputParameters validParams()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< std::vector< Real > > _new_samples
Vectors of new proposed samples.
void ErrorVector unsigned int
registerMooseObject("StochasticToolsApp", GenericActiveLearningSampler)
dof_id_type getNumberOfCols() const
std::vector< std::vector< Real > > _inputs_all
Storage for all the proposed samples.
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample for the given row and column.
const unsigned int _num_tries
Number of samples to propose in each iteration (not all are sent for subApp evals) ...
void setNumberOfRandomSeeds(std::size_t number)
std::vector< Distribution const * > _distributions
Storage for distribution objects to be utilized.