Line data Source code
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 : 10 : #pragma once 11 : 12 : #include "ActiveLearningGaussianProcess.h" 13 : #include "Standardizer.h" 14 : #include <Eigen/Dense> 15 : 16 : #include "StochasticToolsApp.h" 17 : #include "LoadSurrogateDataAction.h" 18 : 19 : #include "SurrogateModelInterface.h" 20 : #include "SurrogateTrainer.h" 21 : #include "MooseRandom.h" 22 : 23 : #include "Distribution.h" 24 : 25 : #include "CovarianceFunctionBase.h" 26 : #include "CovarianceInterface.h" 27 : 28 : #include "GaussianProcess.h" 29 : 30 : class ActiveLearningGaussianProcess : public SurrogateTrainerBase, 31 : public CovarianceInterface, 32 : public SurrogateModelInterface 33 : { 34 : public: 35 : static InputParameters validParams(); 36 : ActiveLearningGaussianProcess(const InputParameters & parameters); 37 : 38 2372 : virtual void initialize() final {} 39 2372 : virtual void execute() final {} 40 : virtual void reTrain(const std::vector<std::vector<Real>> & inputs, 41 : const std::vector<Real> & outputs) const final; 42 : 43 : StochasticTools::GaussianProcess & gp() { return _gp; } 44 : const StochasticTools::GaussianProcess & getGP() const { return _gp; } 45 : 46 : private: 47 : /// Name for the meta data associated with training 48 : const std::string _model_meta_data_name; 49 : 50 : /// The GP handler 51 : StochasticTools::GaussianProcess & _gp; 52 : 53 : /// Paramaters (x) used for training, along with statistics 54 : RealEigenMatrix & _training_params; 55 : 56 : /// Switch for training param (x) standardization 57 : bool _standardize_params; 58 : 59 : /// Switch for training data(y) standardization 60 : bool _standardize_data; 61 : 62 : /// Struct holding parameters necessary for parameter tuning 63 : const StochasticTools::GaussianProcess::GPOptimizerOptions _optimization_opts; 64 : };