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

Isotropic bandwidth matrix (single scalar parameter h). More...

#include <kernel++.h>

Inheritance diagram for cmp::kernel::IsotropicBandwidth:
Collaboration diagram for cmp::kernel::IsotropicBandwidth:

Public Member Functions

 IsotropicBandwidth ()=delete
 
 IsotropicBandwidth (const double &h, const size_t &dim)
 Constructs an IsotropicBandwidth object.
 
Eigen::VectorXd apply (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2) const override
 Scales the distance between two vectors by 1/h.
 
double determinant () const override
 Computes the determinant of the bandwidth matrix (h^D).
 
size_t size () const override
 Returns the dimension of the space.
 
Eigen::VectorXd gradientOfApply (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const size_t &i) const override
 Computes the gradient of the scaling transformation with respect to h.
 
double gradientOfLogDeterminant (const size_t &i) const override
 Computes the gradient of the log-determinant (D / h).
 
void setFromVector (const Eigen::VectorXd &params)
 Sets the bandwidth parameter from a parameter vector.
 
Eigen::VectorXd getParams () const
 Returns the bandwidth parameter vector.
 
- Public Member Functions inherited from cmp::kernel::Bandwidth
virtual ~Bandwidth ()=default
 

Static Public Member Functions

static std::shared_ptr< Bandwidthmake (const double &h, const size_t &dim)
 Factory method for creating an IsotropicBandwidth.
 

Private Attributes

double h_ {1.0}
 Bandwidth scalar parameter.
 
size_t dim_ {1}
 Dimension of the input data.
 

Detailed Description

Isotropic bandwidth matrix (single scalar parameter h).

Mathematical Formulation Defines a spherical scaling matrix \(\mathbf{H} = h \mathbf{I}_D\). The transformation scales inputs uniformly:

\[ \mathbf{z} = \frac{1}{h} (\mathbf{x}_1 - \mathbf{x}_2) \]

The determinant is \(\det(\mathbf{H}) = h^D\).

Constructor & Destructor Documentation

◆ IsotropicBandwidth() [1/2]

cmp::kernel::IsotropicBandwidth::IsotropicBandwidth ( )
delete

◆ IsotropicBandwidth() [2/2]

cmp::kernel::IsotropicBandwidth::IsotropicBandwidth ( const double &  h,
const size_t &  dim 
)
inline

Constructs an IsotropicBandwidth object.

Parameters
hSmoothing bandwidth scalar.
dimDimension of the data.

Member Function Documentation

◆ apply()

Eigen::VectorXd cmp::kernel::IsotropicBandwidth::apply ( const Eigen::VectorXd &  x1,
const Eigen::VectorXd &  x2 
) const
overridevirtual

Scales the distance between two vectors by 1/h.

Implements cmp::kernel::Bandwidth.

◆ determinant()

double cmp::kernel::IsotropicBandwidth::determinant ( ) const
overridevirtual

Computes the determinant of the bandwidth matrix (h^D).

Implements cmp::kernel::Bandwidth.

◆ getParams()

Eigen::VectorXd cmp::kernel::IsotropicBandwidth::getParams ( ) const
inlinevirtual

Returns the bandwidth parameter vector.

Implements cmp::kernel::Bandwidth.

◆ gradientOfApply()

Eigen::VectorXd cmp::kernel::IsotropicBandwidth::gradientOfApply ( const Eigen::VectorXd &  x1,
const Eigen::VectorXd &  x2,
const size_t &  i 
) const
overridevirtual

Computes the gradient of the scaling transformation with respect to h.

Implements cmp::kernel::Bandwidth.

◆ gradientOfLogDeterminant()

double cmp::kernel::IsotropicBandwidth::gradientOfLogDeterminant ( const size_t &  i) const
overridevirtual

Computes the gradient of the log-determinant (D / h).

Implements cmp::kernel::Bandwidth.

◆ make()

static std::shared_ptr< Bandwidth > cmp::kernel::IsotropicBandwidth::make ( const double &  h,
const size_t &  dim 
)
inlinestatic

Factory method for creating an IsotropicBandwidth.

◆ setFromVector()

void cmp::kernel::IsotropicBandwidth::setFromVector ( const Eigen::VectorXd &  params)
inlinevirtual

Sets the bandwidth parameter from a parameter vector.

Implements cmp::kernel::Bandwidth.

◆ size()

size_t cmp::kernel::IsotropicBandwidth::size ( ) const
inlineoverridevirtual

Returns the dimension of the space.

Implements cmp::kernel::Bandwidth.

Member Data Documentation

◆ dim_

size_t cmp::kernel::IsotropicBandwidth::dim_ {1}
private

Dimension of the input data.

◆ h_

double cmp::kernel::IsotropicBandwidth::h_ {1.0}
private

Bandwidth scalar parameter.


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