Base class for all covariance kernels. More...
#include <KernelBase.h>
Base class for all covariance kernels.
Definition at line 35 of file KernelBase.h.
Public Member Functions | |
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 ¶ms) |
virtual std::shared_ptr< KernelBase > | Clone () const =0 |
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 |
Returns a state space representation of the covariance kernel. More... | |
virtual void | FillPosDerivBlock (Eigen::Ref< const Eigen::VectorXd > const &x1, Eigen::Ref< const Eigen::VectorXd > const &x2, Eigen::Ref< const Eigen::VectorXd > const ¶ms, std::vector< int > const &wrts, Eigen::Ref< Eigen::MatrixXd > block) const =0 |
virtual void | FillBlock (Eigen::Ref< const Eigen::VectorXd > const &x1, Eigen::Ref< const Eigen::VectorXd > const &x2, Eigen::Ref< const Eigen::VectorXd > const ¶ms, Eigen::Ref< Eigen::MatrixXd > block) const =0 |
Public Attributes | |
const std::vector< unsigned int > | dimInds |
const unsigned int | inputDim |
const unsigned int | coDim |
const unsigned int | numParams |
|
inline |
Definition at line 40 of file KernelBase.h.
|
inline |
Definition at line 45 of file KernelBase.h.
|
inlinevirtual |
Definition at line 55 of file KernelBase.h.
|
virtual |
Definition at line 24 of file KernelBase.cpp.
References coDim, and FillCovariance().
|
virtual |
Definition at line 31 of file KernelBase.cpp.
References coDim, and FillCovariance().
|
inlinestaticprivate |
Definition at line 162 of file KernelBase.h.
|
pure virtual |
Implemented in muq::Approximation::SumKernel, muq::Approximation::ProductKernel, muq::Approximation::LinearTransformKernel, muq::Approximation::KernelImpl< ChildType >, muq::Approximation::KernelImpl< SquaredExpKernel >, muq::Approximation::KernelImpl< MaternKernel >, muq::Approximation::KernelImpl< WhiteNoiseKernel >, muq::Approximation::KernelImpl< ConstantKernel >, and muq::Approximation::ConcatenateKernel.
Referenced by GetSeperableComponents().
|
virtual |
Definition at line 5 of file KernelBase.cpp.
References cachedParams, coDim, dimInds, and FillBlock().
|
pure virtual |
For particular points and parameters, this function fills in one block of the covariance matrix.
Implemented in muq::Approximation::SumKernel, muq::Approximation::ProductKernel, muq::Approximation::LinearTransformKernel, muq::Approximation::KernelImpl< ChildType >, muq::Approximation::KernelImpl< SquaredExpKernel >, muq::Approximation::KernelImpl< MaternKernel >, muq::Approximation::KernelImpl< WhiteNoiseKernel >, muq::Approximation::KernelImpl< ConstantKernel >, and muq::Approximation::ConcatenateKernel.
Referenced by Evaluate(), and FillCovariance().
|
virtual |
Definition at line 64 of file KernelBase.cpp.
References cachedParams, coDim, dimInds, and FillBlock().
Referenced by BuildCovariance().
|
virtual |
Definition at line 39 of file KernelBase.cpp.
References cachedParams, coDim, dimInds, and FillBlock().
|
virtual |
Definition at line 87 of file KernelBase.cpp.
References cachedParams, coDim, dimInds, and FillPosDerivBlock().
Referenced by GetPosDerivative().
|
pure virtual |
Evaluates a first or higher order derivative of the covariance kernel with respect to one of the position variables.
Implemented in muq::Approximation::SumKernel, muq::Approximation::ProductKernel, muq::Approximation::LinearTransformKernel, muq::Approximation::KernelImpl< ChildType >, muq::Approximation::KernelImpl< SquaredExpKernel >, muq::Approximation::KernelImpl< MaternKernel >, muq::Approximation::KernelImpl< WhiteNoiseKernel >, muq::Approximation::KernelImpl< ConstantKernel >, and muq::Approximation::ConcatenateKernel.
Referenced by FillDerivCovariance().
|
inlinevirtual |
Definition at line 103 of file KernelBase.h.
References paramBounds.
|
inlinevirtual |
Definition at line 109 of file KernelBase.h.
References cachedParams.
|
virtual |
Returns derivatives of the kernel with respect to the first input, x1.
[in] | x1 | The first position passed to the kernel. |
[in] | x2 | The second position passed to the kernel. |
[in] | wrts | A vector defining the order and directions of the spatial derivatives. wrts.size() is the derivative order. |
Definition at line 112 of file KernelBase.cpp.
References coDim, and FillDerivCovariance().
|
inlinevirtual |
Overridden by ProductKernel.
Reimplemented in muq::Approximation::ProductKernel.
Definition at line 63 of file KernelBase.h.
References Clone().
|
inlinevirtual |
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 in muq::Approximation::SumKernel, muq::Approximation::ProductKernel, muq::Approximation::MaternKernel, muq::Approximation::ConstantKernel, and muq::Approximation::ConcatenateKernel.
Definition at line 124 of file KernelBase.h.
|
inlinevirtual |
Definition at line 111 of file KernelBase.h.
References cachedParams, and numParams.
|
protected |
Definition at line 156 of file KernelBase.h.
Referenced by muq::Approximation::ConcatenateKernel::ConcatenateKernel(), muq::Approximation::ConstantKernel::ConstantKernel(), Evaluate(), FillCovariance(), FillDerivCovariance(), GetParams(), muq::Approximation::ConstantKernel::GetStateSpace(), muq::Approximation::MaternKernel::GetStateSpace(), muq::Approximation::LinearTransformKernel::LinearTransformKernel(), muq::Approximation::MaternKernel::MaternKernel(), muq::Approximation::ProductKernel::ProductKernel(), SetParams(), muq::Approximation::SquaredExpKernel::SquaredExpKernel(), muq::Approximation::SumKernel::SumKernel(), and muq::Approximation::WhiteNoiseKernel::WhiteNoiseKernel().
const unsigned int muq::Approximation::KernelBase::coDim |
Definition at line 133 of file KernelBase.h.
Referenced by BuildCovariance(), Evaluate(), muq::Approximation::ConcatenateKernel::FillBlock(), muq::Approximation::SumKernel::FillBlock(), muq::Approximation::ConstantKernel::FillBlockImpl(), FillCovariance(), FillDerivCovariance(), muq::Approximation::ConcatenateKernel::FillPosDerivBlock(), muq::Approximation::ProductKernel::FillPosDerivBlock(), muq::Approximation::SumKernel::FillPosDerivBlock(), muq::Approximation::KernelImpl< ChildType >::FillPosDerivBlockImpl(), GetPosDerivative(), muq::Approximation::ConstantKernel::GetStateSpace(), and KernelBase().
const std::vector<unsigned int> muq::Approximation::KernelBase::dimInds |
Definition at line 129 of file KernelBase.h.
Referenced by Evaluate(), FillCovariance(), FillDerivCovariance(), and muq::Approximation::KernelImpl< ChildType >::GetSegment().
const unsigned int muq::Approximation::KernelBase::inputDim |
Definition at line 132 of file KernelBase.h.
Referenced by muq::Approximation::ConstantKernel::GetStateSpace(), and KernelBase().
const unsigned int muq::Approximation::KernelBase::numParams |
Definition at line 134 of file KernelBase.h.
Referenced by muq::Approximation::ConcatenateKernel::ConcatenateKernel(), muq::Approximation::ConstantKernel::ConstantKernel(), muq::Approximation::ProductKernel::ProductKernel(), SetParams(), and muq::Approximation::SumKernel::SumKernel().
|
protected |
Definition at line 158 of file KernelBase.h.
Referenced by muq::Approximation::ConstantKernel::ConstantKernel(), GetParamBounds(), muq::Approximation::MaternKernel::MaternKernel(), muq::Approximation::SquaredExpKernel::SquaredExpKernel(), and muq::Approximation::WhiteNoiseKernel::WhiteNoiseKernel().