Differentiable radial basis function kernel.
More...
#include <Kernels.hpp>
|
| void | gradient (const Eigen::Ref< const Eigen::VectorXd > x1, const Eigen::Ref< const Eigen::VectorXd > x2, Eigen::Ref< Eigen::VectorXd > dydx1) const override |
| | Gradient of the kernel \( K(\vec{x}_1, \vec{x}_2) \) over the first feature vector. The gradient over the second vector can be calculated by swapping them, due to the symmetry of the kernel function. More...
|
| |
|
virtual | ~Kernel () |
| | Virtual destructor.
|
| |
|
virtual unsigned int | dim () const =0 |
| | Dimension of the feature space.
|
| |
| | RBFKernel (std::unique_ptr< const DifferentiableRadialBasisFunction > &&rbf, unsigned int dim) |
| | Constructor. More...
|
| |
|
| RBFKernel (const RBFKernel &other)=delete |
| |
|
| RBFKernel (RBFKernel &&other)=default |
| |
|
RBFKernel & | operator= (const RBFKernel &other)=delete |
| |
|
RBFKernel & | operator= (RBFKernel &&other)=default |
| |
| double | value (const Eigen::Ref< const Eigen::VectorXd > x1, const Eigen::Ref< const Eigen::VectorXd > x2) const override |
| | Value of the kernel \( K(\vec{x}_1, \vec{x}_2) \). More...
|
| |
|
unsigned int | dim () const override |
| | Dimension of the feature space.
|
| |
|
|
void | validate_arguments (const Eigen::Ref< const Eigen::VectorXd > x1, const Eigen::Ref< const Eigen::VectorXd > x2) const |
| |
|
std::unique_ptr< const DifferentiableRadialBasisFunction > | rbf_ |
| |
template<class DiffRBF = DifferentiableRadialBasisFunction>
class ml::Kernels::DifferentiableRBFKernel< DiffRBF >
Differentiable radial basis function kernel.
- Template Parameters
-
◆ gradient()
template<class DiffRBF = DifferentiableRadialBasisFunction>
| void ml::Kernels::DifferentiableRBFKernel< DiffRBF >::gradient |
( |
const Eigen::Ref< const Eigen::VectorXd > |
x1, |
|
|
const Eigen::Ref< const Eigen::VectorXd > |
x2, |
|
|
Eigen::Ref< Eigen::VectorXd > |
dydx1 |
|
) |
| const |
|
inlineoverridevirtual |
Gradient of the kernel \( K(\vec{x}_1, \vec{x}_2) \) over the first feature vector. The gradient over the second vector can be calculated by swapping them, due to the symmetry of the kernel function.
- Parameters
-
| [in] | x1 | First feature vector. |
| [in] | x2 | Second feature vector. |
| [out] | Gradient | over x1. Must have the same size as x1 and x2. |
- Exceptions
-
| std::invalid_argument | If x1.size() != #dim(), x2.size() != #dim() or dydx1.size() != #dim(). |
Implements ml::Kernels::DifferentiableKernel.
The documentation for this class was generated from the following file: