19 params.
addClassDescription(
"Perform active learning decision making in bi-fidelity modeling.");
22 "Value of the LF model output from the SubApp.");
23 params.
addParam<ReporterValueName>(
"lf_corrected",
"lf_corrected",
"GP-corrected LF prediciton.");
30 _sampler(getSampler(
"sampler")),
32 _lf_corrected(declareValue<
std::vector<
Real>>(
"lf_corrected",
33 std::vector<
Real>(sampler().getNumberOfRows()))),
34 _local_comm(_sampler.getLocalComm())
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
virtual void setupData(const std::vector< std::vector< Real >> &inputs, const std::vector< Real > &outputs)
This sets up data for re-training the GP.
std::vector< Real > _outputs_batch
Store all the outputs used for training.
const int _n_train
Number of initial training points for GP.
static InputParameters validParams()
bool _decision
GP pass/fail decision.
virtual void reTrain(const std::vector< std::vector< Real >> &inputs, const std::vector< Real > &outputs) const final
const std::vector< Real > & _outputs_global
Reference to global output data requested from base class.
const std::vector< Real > & _outputs_lf
Store all the outputs used for training from the LF model.
BiFidelityActiveLearningGPDecision(const InputParameters ¶meters)
libMesh::Parallel::Communicator & _local_comm
Communicator that was split based on samples that have rows.
std::vector< Real > & _lf_corrected
Broadcast the GP-corrected LF prediciton to JSON.
static InputParameters validParams()
virtual Real evaluate(const std::vector< Real > &x) const
Evaluate surrogate model given a row of parameters.
const ReporterMode REPORTER_MODE_DISTRIBUTED
virtual bool needSample(const std::vector< Real > &row, dof_id_type local_ind, dof_id_type global_ind, Real &val) override
Based on the computations in preNeedSample, the decision to get more data is passed and results from ...
virtual bool facilitateDecision() override
This makes decisions whether to call the full model or not based on GP prediction and uncertainty...
std::vector< std::vector< Real > > _inputs_batch
Store all the input vectors used for training.
const ActiveLearningGaussianProcess & _al_gp
The active learning GP trainer that permits re-training.
std::vector< Real > _outputs_lf_batch
Store all the outputs used for training from the LF model.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void preNeedSample() override
This is where most of the computations happen:
registerMooseObject("StochasticToolsApp", BiFidelityActiveLearningGPDecision)
bool learningFunction(const Real &gp_mean, const Real &gp_std) const
This method evaluates the active learning acquisition function and returns bool that indicates whethe...
std::vector< Real > & _gp_mean
Broadcast the GP mean prediciton to JSON.
A class for performing active learning decision making in bi-fidelity modeling.
const SurrogateModel & _gp_eval
The GP evaluator object that permits re-evaluations.
std::vector< std::vector< Real > > & _inputs
Storage for the input vectors to be transferred to the output file.
std::vector< Real > & _gp_std
Broadcast the GP standard deviation to JSON.
const std::vector< std::vector< Real > > & _inputs_global
Reference to global input data requested from base class.
std::vector< bool > & _flag_sample
Flag samples when the GP fails.