https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BiFidelityActiveLearningGPDecision.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9#ifdef MOOSE_LIBTORCH_ENABLED
10
11#pragma once
12
14
19{
20public:
22
24
25protected:
32 virtual void preNeedSample() override;
33
44 virtual bool needSample(const std::vector<Real> & row,
45 dof_id_type local_ind,
46 dof_id_type global_ind,
47 Real & val) override;
48
55 virtual bool facilitateDecision() override;
56
57private:
60
62 const std::vector<Real> & _outputs_lf;
63
65 std::vector<Real> _outputs_lf_batch;
66
68 std::vector<Real> & _lf_corrected;
69
72};
73
74#endif
A class for performing active learning decision making in bi-fidelity modeling.
std::vector< Real > _outputs_lf_batch
Store all the outputs used for training from the LF model.
std::vector< Real > & _lf_corrected
Broadcast the GP-corrected LF prediciton to JSON.
const std::vector< Real > & _outputs_lf
Store all the outputs used for training from the LF model.
virtual bool facilitateDecision() override
This makes decisions whether to call the full model or not based on GP prediction and uncertainty.
virtual void preNeedSample() override
This is where most of the computations happen:
libMesh::Parallel::Communicator & _local_comm
Communicator that was split based on samples that have rows.
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 ...
const InputParameters & parameters() const