The standard Laplacian kernel. More...
Public Member Functions | |
| LaplacianKernel (double bandwidth) | |
| Construct the Laplacian kernel with a custom bandwidth. | |
| LaplacianKernel () | |
| Default constructor; sets bandwidth to 1.0. | |
| double & | Bandwidth () |
| Modify the bandwidth. | |
| double | Bandwidth () const |
| Get the bandwidth. | |
| double | Evaluate (const double t) const |
| Evaluation of the Laplacian kernel given the distance between two points. | |
| template<typename VecType > | |
| double | Evaluate (const VecType &a, const VecType &b) const |
| Evaluation of the Laplacian kernel. | |
Private Attributes | |
| double | bandwidth |
| Kernel bandwidth. | |
The standard Laplacian kernel.
Given two vectors
,
, and a bandwidth
(set in the constructor),
The implementation is all in the header file because it is so simple.
Definition at line 40 of file laplacian_kernel.hpp.
| mlpack::kernel::LaplacianKernel::LaplacianKernel | ( | ) | [inline] |
Default constructor; sets bandwidth to 1.0.
Definition at line 46 of file laplacian_kernel.hpp.
| mlpack::kernel::LaplacianKernel::LaplacianKernel | ( | double | bandwidth | ) | [inline] |
Construct the Laplacian kernel with a custom bandwidth.
| bandwidth | The bandwidth of the kernel ( ). |
Definition at line 54 of file laplacian_kernel.hpp.
| double& mlpack::kernel::LaplacianKernel::Bandwidth | ( | ) | [inline] |
| double mlpack::kernel::LaplacianKernel::Bandwidth | ( | ) | const [inline] |
| double mlpack::kernel::LaplacianKernel::Evaluate | ( | const double | t | ) | const [inline] |
Evaluation of the Laplacian kernel given the distance between two points.
| t | The distance between the two points the kernel should be evaluated on. |
) specified in the constructor. Definition at line 84 of file laplacian_kernel.hpp.
References bandwidth.
| double mlpack::kernel::LaplacianKernel::Evaluate | ( | const VecType & | a, | |
| const VecType & | b | |||
| ) | const [inline] |
Evaluation of the Laplacian kernel.
This could be generalized to use any distance metric, not the Euclidean distance, but for now, the Euclidean distance is used.
| VecType | Type of vector (likely arma::vec or arma::spvec). |
| a | First vector. | |
| b | Second vector. |
) specified in the constructor. Definition at line 70 of file laplacian_kernel.hpp.
References bandwidth, and mlpack::metric::LMetric< Power, TakeRoot >::Evaluate().
double mlpack::kernel::LaplacianKernel::bandwidth [private] |
Kernel bandwidth.
Definition at line 97 of file laplacian_kernel.hpp.
Referenced by Bandwidth(), and Evaluate().
1.6.1