CMP++: Uncertainty Quantification & Bayesian Calibration
Loading...
Searching...
No Matches
cmp::covariance::SquaredExponential Class Reference

Squared Exponential (RBF / Gaussian) covariance function. More...

#include <covariance.h>

Inheritance diagram for cmp::covariance::SquaredExponential:
Collaboration diagram for cmp::covariance::SquaredExponential:

Public Member Functions

 SquaredExponential (const SquaredExponential &)=default
 
 SquaredExponential (SquaredExponential &&)=default
 
SquaredExponentialoperator= (const SquaredExponential &)=default
 
SquaredExponentialoperator= (SquaredExponential &&)=default
 
 SquaredExponential (const size_t &index, const int &indexX=-1)
 
double eval (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par) const
 
double evalGradient (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par, const size_t &i) const
 
double evalHessian (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par, const size_t &i, const size_t &j) const
 
- Public Member Functions inherited from cmp::covariance::Covariance
virtual ~Covariance ()=default
 

Static Public Member Functions

static std::shared_ptr< Covariancemake (const size_t &l, const int &i)
 

Private Attributes

size_t index_
 Hyperparameter index for the lengthscale parameter.
 
int indexX_
 Dimension index to evaluate, or -1 for the full isotropic kernel.
 

Detailed Description

Squared Exponential (RBF / Gaussian) covariance function.

Mathematical Formulation Evaluates the squared exponential kernel between two inputs \(\mathbf{x}_1, \mathbf{x}_2\):

\[ k(\mathbf{x}_1, \mathbf{x}_2) = \exp\left( -\frac{1}{2} \left(\frac{d}{\ell}\right)^2 \right) \]

where \(d\) is the distance (Euclidean norm \(\|\mathbf{x}_1 - \mathbf{x}_2\|_2\) if isotropic, or absolute coordinate distance \(|x_{1,i} - x_{2,i}|\) if restricted to dimension \(i\)), and \(\ell = \theta_{\text{index}}\) is the lengthscale hyperparameter.

Implementation Algorithm

  1. Computes the distance \(d\) based on the component index configuration.
  2. Computes the exponential kernel value.
  3. Evaluates analytical first-order and second-order derivatives with respect to the lengthscale \(\ell\).

Constructor & Destructor Documentation

◆ SquaredExponential() [1/3]

cmp::covariance::SquaredExponential::SquaredExponential ( const SquaredExponential )
default

◆ SquaredExponential() [2/3]

cmp::covariance::SquaredExponential::SquaredExponential ( SquaredExponential &&  )
default

◆ SquaredExponential() [3/3]

cmp::covariance::SquaredExponential::SquaredExponential ( const size_t &  index,
const int &  indexX = -1 
)
inline

Member Function Documentation

◆ eval()

double cmp::covariance::SquaredExponential::eval ( const Eigen::VectorXd &  x1,
const Eigen::VectorXd &  x2,
const Eigen::VectorXd &  par 
) const
inlinevirtual

◆ evalGradient()

double cmp::covariance::SquaredExponential::evalGradient ( const Eigen::VectorXd &  x1,
const Eigen::VectorXd &  x2,
const Eigen::VectorXd &  par,
const size_t &  i 
) const
inlinevirtual

◆ evalHessian()

double cmp::covariance::SquaredExponential::evalHessian ( const Eigen::VectorXd &  x1,
const Eigen::VectorXd &  x2,
const Eigen::VectorXd &  par,
const size_t &  i,
const size_t &  j 
) const
inlinevirtual

◆ make()

static std::shared_ptr< Covariance > cmp::covariance::SquaredExponential::make ( const size_t &  l,
const int &  i 
)
inlinestatic

◆ operator=() [1/2]

SquaredExponential & cmp::covariance::SquaredExponential::operator= ( const SquaredExponential )
default

◆ operator=() [2/2]

SquaredExponential & cmp::covariance::SquaredExponential::operator= ( SquaredExponential &&  )
default

Member Data Documentation

◆ index_

size_t cmp::covariance::SquaredExponential::index_
private

Hyperparameter index for the lengthscale parameter.

◆ indexX_

int cmp::covariance::SquaredExponential::indexX_
private

Dimension index to evaluate, or -1 for the full isotropic kernel.


The documentation for this class was generated from the following file: