#include <ExponentialCovariance.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
ExponentialCovariance (const InputParameters ¶meters) | |
void | computeCovarianceMatrix (RealEigenMatrix &K, const RealEigenMatrix &x, const RealEigenMatrix &xp, const bool is_self_covariance) const override |
Generates the Covariance Matrix given two points in the parameter space. More... | |
bool | computedKdhyper (RealEigenMatrix &dKdhp, const RealEigenMatrix &x, const std::string &hyper_param_name, unsigned int ind) const override |
Redirect dK/dhp for hyperparameter "hp". More... | |
void | loadHyperParamMap (const std::unordered_map< std::string, Real > &map, const std::unordered_map< std::string, std::vector< Real >> &vec_map) |
Load some hyperparameters into the local maps contained in this object. More... | |
void | buildHyperParamMap (std::unordered_map< std::string, Real > &map, std::unordered_map< std::string, std::vector< Real >> &vec_map) const |
Populates the input maps with the owned hyperparameters. More... | |
virtual bool | getTuningData (const std::string &name, unsigned int &size, Real &min, Real &max) const |
Get the default minimum and maximum and size of a hyperparameter. More... | |
void | dependentCovarianceTypes (std::map< UserObjectName, std::string > &name_type_map) const |
Populate a map with the names and types of the dependent covariance functions. More... | |
const std::vector< UserObjectName > & | dependentCovarianceNames () const |
Get the names of the dependent covariances. More... | |
virtual bool | isTunable (const std::string &name) const |
Check if a given parameter is tunable. More... | |
unsigned int | numOutputs () const |
Return the number of outputs assumed for this covariance function. More... | |
std::unordered_map< std::string, Real > & | hyperParamMapReal () |
Get the map of scalar parameters. More... | |
std::unordered_map< std::string, std::vector< Real > > & | hyperParamMapVectorReal () |
Get the map of vector parameters. More... | |
virtual bool | enabled () const |
std::shared_ptr< MooseObject > | getSharedPtr () |
std::shared_ptr< const MooseObject > | getSharedPtr () const |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
virtual const std::string & | name () const |
std::string | typeAndName () const |
std::string | errorPrefix (const std::string &error_type) const |
void | callMooseError (std::string msg, const bool with_prefix) const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
const InputParameters & | parameters () const |
MooseObjectName | uniqueName () const |
const T & | getParam (const std::string &name) const |
std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
const T * | queryParam (const std::string &name) const |
const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
bool | isParamValid (const std::string &name) const |
bool | isParamSetByUser (const std::string &nm) const |
void | paramError (const std::string ¶m, Args... args) const |
void | paramWarning (const std::string ¶m, Args... args) const |
void | paramInfo (const std::string ¶m, Args... args) const |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | mooseError (Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) const |
std::string | getDataFileName (const std::string ¶m) const |
std::string | getDataFileNameByName (const std::string &relative_path) const |
std::string | getDataFilePath (const std::string &relative_path) const |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Static Public Member Functions | |
static InputParameters | validParams () |
static void | ExponentialFunction (RealEigenMatrix &K, const RealEigenMatrix &x, const RealEigenMatrix &xp, const std::vector< Real > &length_factor, const Real sigma_f_squared, const Real sigma_n_squared, const Real gamma, const bool is_self_covariance) |
static void | computedKdlf (RealEigenMatrix &K, const RealEigenMatrix &x, const std::vector< Real > &length_factor, const Real sigma_f_squared, const Real gamma, const int ind) |
Computes dK/dlf for individual length factors. More... | |
Public Attributes | |
const ConsoleStream | _console |
Protected Member Functions | |
const Real & | addRealHyperParameter (const std::string &name, const Real value, const bool is_tunable) |
Register a scalar hyperparameter to this covariance function. More... | |
const std::vector< Real > & | addVectorRealHyperParameter (const std::string &name, const std::vector< Real > value, const bool is_tunable) |
Register a vector hyperparameter to this covariance function. More... | |
CovarianceFunctionBase * | getCovarianceFunctionByName (const UserObjectName &name) const |
Lookup a CovarianceFunction object by name and return pointer. More... | |
Protected Attributes | |
std::unordered_map< std::string, Real > | _hp_map_real |
Map of real-valued hyperparameters. More... | |
std::unordered_map< std::string, std::vector< Real > > | _hp_map_vector_real |
Map of vector-valued hyperparameters. More... | |
std::unordered_set< std::string > | _tunable_hp |
list of tunable hyper-parameters More... | |
const unsigned int | _num_outputs |
The number of outputs this covariance function is used to describe. More... | |
const std::vector< UserObjectName > | _dependent_covariance_names |
The names of the dependent covariance functions. More... | |
std::vector< std::string > | _dependent_covariance_types |
The types of the dependent covariance functions. More... | |
std::vector< CovarianceFunctionBase * > | _covariance_functions |
Vector of pointers to the dependent covariance functions. More... | |
const bool & | _enabled |
MooseApp & | _app |
const std::string | _type |
const std::string | _name |
const InputParameters & | _pars |
Factory & | _factory |
ActionFactory & | _action_factory |
const Parallel::Communicator & | _communicator |
Private Attributes | |
const std::vector< Real > & | _length_factor |
lengh factor () for the kernel, in vector form for multiple parameters More... | |
const Real & | _sigma_f_squared |
signal variance (^2) More... | |
const Real & | _sigma_n_squared |
noise variance (^2) More... | |
const Real & | _gamma |
gamma exponential factor for use in kernel More... | |
Definition at line 14 of file ExponentialCovariance.h.
ExponentialCovariance::ExponentialCovariance | ( | const InputParameters & | parameters | ) |
Definition at line 30 of file ExponentialCovariance.C.
|
protectedinherited |
Register a scalar hyperparameter to this covariance function.
name | The name of the parameter |
value | The initial value of the parameter |
is_tunable | If the parameter is tunable during optimization |
Definition at line 52 of file CovarianceFunctionBase.C.
|
protectedinherited |
Register a vector hyperparameter to this covariance function.
name | The name of the parameter |
value | The initial value of the parameter |
is_tunable | If the parameter is tunable during optimization |
Definition at line 63 of file CovarianceFunctionBase.C.
Referenced by LMC::LMC().
|
inherited |
Populates the input maps with the owned hyperparameters.
map | Map of scalar hyperparameters that should be populated |
vec_map | Map of vector hyperparameters that should be populated |
Definition at line 115 of file CovarianceFunctionBase.C.
Referenced by StochasticTools::GaussianProcess::setupCovarianceMatrix(), and StochasticTools::GaussianProcess::tuneHyperParamsAdam().
|
overridevirtual |
Generates the Covariance Matrix given two points in the parameter space.
Implements CovarianceFunctionBase.
Definition at line 43 of file ExponentialCovariance.C.
|
overridevirtual |
Redirect dK/dhp for hyperparameter "hp".
Reimplemented from CovarianceFunctionBase.
Definition at line 89 of file ExponentialCovariance.C.
|
static |
Computes dK/dlf for individual length factors.
Definition at line 121 of file ExponentialCovariance.C.
Referenced by computedKdhyper().
|
inlineinherited |
Get the names of the dependent covariances.
Definition at line 62 of file CovarianceFunctionBase.h.
Referenced by StochasticTools::GaussianProcess::linkCovarianceFunction().
|
inherited |
Populate a map with the names and types of the dependent covariance functions.
name_type_map | Reference to the map which should be populated |
Definition at line 163 of file CovarianceFunctionBase.C.
Referenced by StochasticTools::GaussianProcess::linkCovarianceFunction().
|
static |
Definition at line 56 of file ExponentialCovariance.C.
Referenced by computeCovarianceMatrix(), and computedKdhyper().
|
protectedinherited |
Lookup a CovarianceFunction object by name and return pointer.
Definition at line 25 of file CovarianceInterface.C.
Referenced by ActiveLearningGaussianProcess::ActiveLearningGaussianProcess(), CovarianceFunctionBase::CovarianceFunctionBase(), GaussianProcessTrainer::GaussianProcessTrainer(), and GaussianProcessSurrogate::setupCovariance().
|
virtualinherited |
Get the default minimum and maximum and size of a hyperparameter.
Returns false is the parameter has not been found in this covariance object.
name | The name of the hyperparameter |
size | Reference to an unsigned int that will contain the size of the hyperparameter (will be populated with 1 if it is scalar) |
min | Reference to a number which will be populated by the maximum allowed value of the hyperparameter |
max | Reference to a number which will be populated by the minimum allowed value of the hyperparameter |
Definition at line 131 of file CovarianceFunctionBase.C.
Referenced by StochasticTools::GaussianProcess::generateTuningMap().
|
inlineinherited |
Get the map of scalar parameters.
Definition at line 88 of file CovarianceFunctionBase.h.
|
inlineinherited |
Get the map of vector parameters.
Definition at line 91 of file CovarianceFunctionBase.h.
|
virtualinherited |
Check if a given parameter is tunable.
The | name of the hyperparameter |
Definition at line 74 of file CovarianceFunctionBase.C.
Referenced by StochasticTools::GaussianProcess::generateTuningMap().
|
inherited |
Load some hyperparameters into the local maps contained in this object.
map | Input map of scalar hyperparameters |
vec_map | Input map of vector hyperparameters |
Definition at line 91 of file CovarianceFunctionBase.C.
Referenced by LoadCovarianceDataAction::load(), and StochasticTools::GaussianProcess::tuneHyperParamsAdam().
|
inlineinherited |
Return the number of outputs assumed for this covariance function.
Definition at line 85 of file CovarianceFunctionBase.h.
Referenced by GaussianProcessSurrogate::evaluate(), GaussianProcessTrainer::GaussianProcessTrainer(), and StochasticTools::GaussianProcess::linkCovarianceFunction().
|
static |
Definition at line 16 of file ExponentialCovariance.C.
|
protectedinherited |
Vector of pointers to the dependent covariance functions.
Definition at line 131 of file CovarianceFunctionBase.h.
Referenced by CovarianceFunctionBase::buildHyperParamMap(), LMC::computeCovarianceMatrix(), LMC::computedKdhyper(), CovarianceFunctionBase::CovarianceFunctionBase(), CovarianceFunctionBase::dependentCovarianceTypes(), CovarianceFunctionBase::getTuningData(), CovarianceFunctionBase::isTunable(), and CovarianceFunctionBase::loadHyperParamMap().
|
protectedinherited |
The names of the dependent covariance functions.
Definition at line 125 of file CovarianceFunctionBase.h.
Referenced by CovarianceFunctionBase::CovarianceFunctionBase(), and CovarianceFunctionBase::dependentCovarianceNames().
|
protectedinherited |
The types of the dependent covariance functions.
Definition at line 128 of file CovarianceFunctionBase.h.
Referenced by CovarianceFunctionBase::CovarianceFunctionBase().
|
private |
gamma exponential factor for use in kernel
Definition at line 60 of file ExponentialCovariance.h.
Referenced by computeCovarianceMatrix(), and computedKdhyper().
|
protectedinherited |
Map of real-valued hyperparameters.
Definition at line 113 of file CovarianceFunctionBase.h.
Referenced by CovarianceFunctionBase::addRealHyperParameter(), CovarianceFunctionBase::buildHyperParamMap(), CovarianceFunctionBase::getTuningData(), CovarianceFunctionBase::hyperParamMapReal(), CovarianceFunctionBase::isTunable(), and CovarianceFunctionBase::loadHyperParamMap().
|
protectedinherited |
Map of vector-valued hyperparameters.
Definition at line 116 of file CovarianceFunctionBase.h.
Referenced by CovarianceFunctionBase::addVectorRealHyperParameter(), CovarianceFunctionBase::buildHyperParamMap(), CovarianceFunctionBase::getTuningData(), CovarianceFunctionBase::hyperParamMapVectorReal(), CovarianceFunctionBase::isTunable(), LMC::LMC(), and CovarianceFunctionBase::loadHyperParamMap().
|
private |
lengh factor () for the kernel, in vector form for multiple parameters
Definition at line 51 of file ExponentialCovariance.h.
Referenced by computeCovarianceMatrix(), and computedKdhyper().
|
protectedinherited |
The number of outputs this covariance function is used to describe.
Definition at line 122 of file CovarianceFunctionBase.h.
Referenced by LMC::computeAGradient(), LMC::computeBMatrix(), LMC::computeCovarianceMatrix(), LMC::computedKdhyper(), LMC::LMC(), and CovarianceFunctionBase::numOutputs().
|
private |
signal variance (^2)
Definition at line 54 of file ExponentialCovariance.h.
Referenced by computeCovarianceMatrix(), and computedKdhyper().
|
private |
noise variance (^2)
Definition at line 57 of file ExponentialCovariance.h.
Referenced by computeCovarianceMatrix().
|
protectedinherited |
list of tunable hyper-parameters
Definition at line 119 of file CovarianceFunctionBase.h.
Referenced by CovarianceFunctionBase::addRealHyperParameter(), CovarianceFunctionBase::addVectorRealHyperParameter(), LMC::computedKdhyper(), and CovarianceFunctionBase::isTunable().