MUQ  0.4.3
muq::Approximation::ConcatenateKernel Class Reference

#include <ConcatenateKernel.h>

Inheritance diagram for muq::Approximation::ConcatenateKernel:

Detailed Description

   @class ConcatenateKernel
   @ingroup CovarianceKernels
   @brief Concatenates two kernels together.
   @details Let \f$k_1(x,x^\prime)\f$ and \f$k_2(x,x^\prime)\f$ be two different covariance kernels with the same inputs.  This class describes a concatenated kernel of the form

\[ k(x,x^\prime) = \left[\begin{array}{cc}k_1(x,x^\prime) & 0\\ 0 & k_2(x,x^\prime)\end{array}\right]. \]

Definition at line 21 of file ConcatenateKernel.h.

Public Member Functions

 ConcatenateKernel (std::shared_ptr< KernelBase > const &kernel1In, std::shared_ptr< KernelBase > const &kernel2In)
 
 ConcatenateKernel (std::vector< std::shared_ptr< KernelBase >> const &kernelsIn)
 
virtual ~ConcatenateKernel ()=default
 
virtual std::shared_ptr< KernelBaseClone () const override
 
virtual void FillBlock (Eigen::Ref< const Eigen::VectorXd > const &x1, Eigen::Ref< const Eigen::VectorXd > const &x2, Eigen::Ref< const Eigen::VectorXd > const &params, Eigen::Ref< Eigen::MatrixXd > block) const override
 
virtual void FillPosDerivBlock (Eigen::Ref< const Eigen::VectorXd > const &x1, Eigen::Ref< const Eigen::VectorXd > const &x2, Eigen::Ref< const Eigen::VectorXd > const &params, std::vector< int > const &wrts, Eigen::Ref< Eigen::MatrixXd > block) const override
 
virtual std::tuple< std::shared_ptr< muq::Modeling::LinearSDE >, std::shared_ptr< muq::Modeling::LinearOperator >, Eigen::MatrixXd > GetStateSpace (boost::property_tree::ptree sdeOptions=boost::property_tree::ptree()) const override
 Returns a state space representation of the covariance kernel. More...
 
- Public Member Functions inherited from muq::Approximation::KernelBase
 KernelBase (unsigned int inputDimIn, unsigned int coDimIn, unsigned int numParamsIn)
 
 KernelBase (unsigned int inputDimIn, std::vector< unsigned int > dimIndsIn, unsigned int coDimIn, unsigned int numParamsIn)
 
virtual ~KernelBase ()
 
virtual std::vector< std::shared_ptr< KernelBase > > GetSeperableComponents ()
 Overridden by ProductKernel. More...
 
virtual Eigen::MatrixXd Evaluate (Eigen::VectorXd const &x1, Eigen::VectorXd const &x2) const
 
virtual Eigen::MatrixXd BuildCovariance (Eigen::MatrixXd const &x) const
 
virtual Eigen::MatrixXd BuildCovariance (Eigen::MatrixXd const &x1, Eigen::MatrixXd const &x2) const
 
virtual void FillCovariance (Eigen::MatrixXd const &xs, Eigen::MatrixXd const &ys, Eigen::Ref< Eigen::MatrixXd > cov) const
 
virtual void FillCovariance (Eigen::MatrixXd const &xs, Eigen::Ref< Eigen::MatrixXd > cov) const
 
virtual void FillDerivCovariance (Eigen::MatrixXd const &xs, Eigen::MatrixXd const &ys, std::vector< int > const &wrts, Eigen::Ref< Eigen::MatrixXd > cov) const
 
virtual Eigen::MatrixXd GetPosDerivative (Eigen::VectorXd const &x1, Eigen::VectorXd const &x2, std::vector< int > const &wrts) const
 Returns derivatives of the kernel with respect to the first input, x1. More...
 
virtual Eigen::MatrixXd GetParamBounds () const
 
virtual Eigen::VectorXd GetParams () const
 
virtual void SetParams (Eigen::VectorXd const &params)
 

Additional Inherited Members

- Public Attributes inherited from muq::Approximation::KernelBase
const std::vector< unsigned int > dimInds
 
const unsigned int inputDim
 
const unsigned int coDim
 
const unsigned int numParams
 

Constructor & Destructor Documentation

◆ ConcatenateKernel() [1/2]

muq::Approximation::ConcatenateKernel::ConcatenateKernel ( std::shared_ptr< KernelBase > const &  kernel1In,
std::shared_ptr< KernelBase > const &  kernel2In 
)
inline

Definition at line 26 of file ConcatenateKernel.h.

◆ ConcatenateKernel() [2/2]

ConcatenateKernel::ConcatenateKernel ( std::vector< std::shared_ptr< KernelBase >> const &  kernelsIn)

◆ ~ConcatenateKernel()

virtual muq::Approximation::ConcatenateKernel::~ConcatenateKernel ( )
virtualdefault

Member Function Documentation

◆ Clone()

virtual std::shared_ptr<KernelBase> muq::Approximation::ConcatenateKernel::Clone ( ) const
inlineoverridevirtual

Implements muq::Approximation::KernelBase.

Definition at line 33 of file ConcatenateKernel.h.

References kernels.

◆ CountCoDims()

unsigned int ConcatenateKernel::CountCoDims ( std::vector< std::shared_ptr< KernelBase >>  kernels)
staticprivate

Definition at line 72 of file ConcatenateKernel.cpp.

◆ CountParams()

unsigned int ConcatenateKernel::CountParams ( std::vector< std::shared_ptr< KernelBase >>  kernels)
staticprivate

Definition at line 79 of file ConcatenateKernel.cpp.

◆ FillBlock()

void ConcatenateKernel::FillBlock ( Eigen::Ref< const Eigen::VectorXd > const &  x1,
Eigen::Ref< const Eigen::VectorXd > const &  x2,
Eigen::Ref< const Eigen::VectorXd > const &  params,
Eigen::Ref< Eigen::MatrixXd >  block 
) const
overridevirtual

For particular points and parameters, this function fills in one block of the covariance matrix.

Implements muq::Approximation::KernelBase.

Definition at line 28 of file ConcatenateKernel.cpp.

References muq::Approximation::KernelBase::coDim, and kernels.

◆ FillPosDerivBlock()

void ConcatenateKernel::FillPosDerivBlock ( Eigen::Ref< const Eigen::VectorXd > const &  x1,
Eigen::Ref< const Eigen::VectorXd > const &  x2,
Eigen::Ref< const Eigen::VectorXd > const &  params,
std::vector< int > const &  wrts,
Eigen::Ref< Eigen::MatrixXd >  block 
) const
overridevirtual

Evaluates a first or higher order derivative of the covariance kernel with respect to one of the position variables.

Implements muq::Approximation::KernelBase.

Definition at line 49 of file ConcatenateKernel.cpp.

References muq::Approximation::KernelBase::coDim, and kernels.

◆ GetStateSpace()

std::tuple< std::shared_ptr< muq::Modeling::LinearSDE >, std::shared_ptr< muq::Modeling::LinearOperator >, Eigen::MatrixXd > ConcatenateKernel::GetStateSpace ( boost::property_tree::ptree  sdeOptions = boost::property_tree::ptree()) const
overridevirtual

Returns a state space representation of the covariance kernel.

If this is a one dimensional kernel (i.e., inputDim=1 and coDim=1), this function returns a state space representation of the covariance kernel. In particular, it returns a linear time invariant stochastic differential equation, whose solution, when started with the returned stationary covariance, provides the same information as this Gaussian process. The first component of the vector-valued stochastic differential equation is related to the Gaussian process. See "Kalman filtering and smoothing solutions to temporal Gaussian process regression models," by Jouni Hartikainen and Simo Sarkka, for more information.

Reimplemented from muq::Approximation::KernelBase.

Definition at line 88 of file ConcatenateKernel.cpp.

References kernels.

Member Data Documentation

◆ kernels

std::vector<std::shared_ptr<KernelBase> > muq::Approximation::ConcatenateKernel::kernels
private

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