Radial basis function kernel.
More...
#include <Kernels.hpp>
|
| | RBFKernel (std::unique_ptr< const RBF > &&rbf, unsigned int dim) |
| | Constructor. More...
|
| |
|
| RBFKernel (const RBFKernel &other)=delete |
| |
|
RBFKernel & | operator= (const RBFKernel &other)=delete |
| |
|
| RBFKernel (RBFKernel &&other)=default |
| |
|
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.
|
| |
|
virtual | ~Kernel () |
| | Virtual destructor.
|
| |
|
|
std::unique_ptr< const RBF > | rbf_ |
| |
|
|
void | validate_arguments (const Eigen::Ref< const Eigen::VectorXd > x1, const Eigen::Ref< const Eigen::VectorXd > x2) const |
| |
template<class RBF = RadialBasisFunction>
class ml::Kernels::RBFKernel< RBF >
Radial basis function kernel.
Kernel function of the form K(x1, x2) = s(||x1 - x2||^2).
See https://en.wikipedia.org/wiki/Radial_basis_function_kernel
- Template Parameters
-
◆ RBFKernel()
template<class RBF = RadialBasisFunction>
Constructor.
- Parameters
-
| rbf | Radial basis function, moved. |
| dim | Dimension of the kernel, positive. |
- Exceptions
-
| std::invalid_argument | If rbf is null. |
| std::domain_error | If dim is zero. |
◆ value()
template<class RBF = RadialBasisFunction>
| double ml::Kernels::RBFKernel< RBF >::value |
( |
const Eigen::Ref< const Eigen::VectorXd > |
x1, |
|
|
const Eigen::Ref< const Eigen::VectorXd > |
x2 |
|
) |
| const |
|
inlineoverridevirtual |
Value of the kernel \( K(\vec{x}_1, \vec{x}_2) \).
- Parameters
-
| [in] | x1 | First feature vector. |
| [in] | x2 | Second feature vector. |
- Returns
- Kernel value.
- Exceptions
-
| std::invalid_argument | If x1.size() != #dim() or x2.size() != #dim(). |
Implements ml::Kernels::Kernel.
The documentation for this class was generated from the following file: