https://mooseframework.inl.gov
LMC.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 
10 #pragma once
11 
12 #include "CovarianceFunctionBase.h"
13 
19 {
20 public:
23 
25  const RealEigenMatrix & x,
26  const RealEigenMatrix & xp,
27  const bool is_self_covariance) const override;
28 
29  bool computedKdhyper(RealEigenMatrix & dKdhp,
30  const RealEigenMatrix & x,
31  const std::string & hyper_param_name,
32  unsigned int ind) const override;
33 
34 protected:
42  void computeBMatrix(RealEigenMatrix & Bmat, const unsigned int exp_i) const;
43 
52  const unsigned int exp_i,
53  const unsigned int index) const;
54 
63  const unsigned int exp_i,
64  const unsigned int index) const;
65 
67  const unsigned int _num_expansion_terms;
68 
69 private:
72  std::vector<const std::vector<Real> *> _a_coeffs;
73  std::vector<const std::vector<Real> *> _lambdas;
74 };
void computeBMatrix(RealEigenMatrix &Bmat, const unsigned int exp_i) const
Computes the covariance matrix for the outputs (using the latent coefficients) We use a $B = a_i a_i...
Definition: LMC.C:161
void computeAGradient(RealEigenMatrix &grad, const unsigned int exp_i, const unsigned int index) const
Computes the gradient of $B$ with respect to the entries in $a_i$ in the following expression: $B = ...
Definition: LMC.C:176
const unsigned int _num_expansion_terms
The number of expansion terms in the output ovariance matrix.
Definition: LMC.h:67
static const std::string K
Definition: NS.h:170
bool computedKdhyper(RealEigenMatrix &dKdhp, const RealEigenMatrix &x, const std::string &hyper_param_name, unsigned int ind) const override
Redirect dK/dhp for hyperparameter "hp".
Definition: LMC.C:89
LMC(const InputParameters &parameters)
Definition: LMC.C:29
Base class for covariance functions that are used in Gaussian Processes.
std::vector< const std::vector< Real > * > _a_coeffs
The vectors in the $B = a_i a_i^T + diag(lambda_i)$ expansion.
Definition: LMC.h:72
static InputParameters validParams()
Definition: LMC.C:17
std::vector< const std::vector< Real > * > _lambdas
Definition: LMC.h:73
const std::vector< double > x
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
std::string grad(const std::string &var)
Definition: NS.h:91
void computeCovarianceMatrix(RealEigenMatrix &K, const RealEigenMatrix &x, const RealEigenMatrix &xp, const bool is_self_covariance) const override
Generates the Covariance Matrix given two sets of points in the parameter space.
Definition: LMC.C:66
const InputParameters & parameters() const
void computeLambdaGradient(RealEigenMatrix &grad, const unsigned int exp_i, const unsigned int index) const
Computes the gradient of $B$ with respect to the entries in $lambda_i$ in the following expression: $...
Definition: LMC.C:190
Covariance function for multi-output Gaussian Processes based on the linear model of coregionalizatio...
Definition: LMC.h:18