9 #ifdef MOOSE_LIBTORCH_ENABLED 40 const torch::Tensor &
x,
41 const torch::Tensor & xp,
42 const bool is_self_covariance)
const = 0;
60 getTuningData(
const std::string &
name,
unsigned int & size, Real & min, Real & max)
const;
81 const torch::Tensor &
x,
82 const std::string & hyper_param_name,
83 unsigned int ind)
const;
105 const std::vector<Real> & value,
106 const bool is_tunable);
HyperParameterMap _hyperparameters
Map of hyperparameters stored as rank-0 or rank-1 tensors.
std::vector< std::string > _dependent_covariance_types
The types of the dependent covariance functions.
std::unordered_set< std::string > _tunable_hp
list of tunable hyper-parameters
static bool isVectorHyperParameter(const torch::Tensor &tensor)
Return true if a hyperparameter tensor stores a vector of values.
static const std::string K
std::unordered_map< std::string, torch::Tensor > HyperParameterMap
const InputParameters & parameters() const
static bool isScalarHyperParameter(const torch::Tensor &tensor)
Return true if a hyperparameter tensor stores one scalar value.
std::vector< CovarianceFunctionBase * > _covariance_functions
Vector of pointers to the dependent covariance functions.
Base class for covariance functions that are used in Gaussian Processes.
static InputParameters validParams()
CovarianceFunctionBase(const InputParameters ¶meters)
void buildHyperParamMap(HyperParameterMap &map) const
Populates the input maps with the owned hyperparameters.
const std::string & name() const
const unsigned int _num_outputs
The number of outputs this covariance function is used to describe.
const std::vector< double > x
const std::vector< UserObjectName > & dependentCovarianceNames() const
Get the names of the dependent covariances.
void loadHyperParamMap(const HyperParameterMap &map)
Load some hyperparameters into the local map contained in this object.
torch::Tensor & addRealHyperParameter(const std::string &name, const Real value, const bool is_tunable)
Register a scalar hyperparameter to this covariance function.
void dependentCovarianceTypes(std::map< UserObjectName, std::string > &name_type_map) const
Populate a map with the names and types of the dependent covariance functions.
virtual bool computedKdhyper(torch::Tensor &dKdhp, const torch::Tensor &x, const std::string &hyper_param_name, unsigned int ind) const
Redirect dK/dhp for hyperparameter "hp".
const std::vector< UserObjectName > _dependent_covariance_names
The names of the dependent covariance functions.
torch::Tensor & addVectorRealHyperParameter(const std::string &name, const std::vector< Real > &value, const bool is_tunable)
Register a vector hyperparameter to this covariance function.
unsigned int numOutputs() const
Return the number of outputs assumed for this covariance function.
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.
virtual bool isTunable(const std::string &name) const
Check if a given parameter is tunable.
virtual void computeCovarianceMatrix(torch::Tensor &K, const torch::Tensor &x, const torch::Tensor &xp, const bool is_self_covariance) const =0
Generates the Covariance Matrix given two sets of points in the parameter space.