|
MLPACK
1.0.11
|
The standard Laplacian kernel. More...
Public Member Functions | |
| LaplacianKernel () | |
| Default constructor; sets bandwidth to 1.0. More... | |
| LaplacianKernel (double bandwidth) | |
| Construct the Laplacian kernel with a custom bandwidth. More... | |
| double | Bandwidth () const |
| Get the bandwidth. More... | |
| double & | Bandwidth () |
| Modify the bandwidth. More... | |
| template<typename VecType > | |
| double | Evaluate (const VecType &a, const VecType &b) const |
| Evaluation of the Laplacian kernel. More... | |
| double | Evaluate (const double t) const |
| Evaluation of the Laplacian kernel given the distance between two points. More... | |
| std::string | ToString () const |
| Return a string representation of the kernel. More... | |
Private Attributes | |
| double | bandwidth |
| Kernel bandwidth. More... | |
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.
|
inline |
Default constructor; sets bandwidth to 1.0.
Definition at line 46 of file laplacian_kernel.hpp.
|
inline |
Construct the Laplacian kernel with a custom bandwidth.
| bandwidth | The bandwidth of the kernel ( ). |
Definition at line 54 of file laplacian_kernel.hpp.
|
inline |
|
inline |
|
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().
|
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.
|
inline |
Return a string representation of the kernel.
Definition at line 96 of file laplacian_kernel.hpp.
References bandwidth.
|
private |
Kernel bandwidth.
Definition at line 106 of file laplacian_kernel.hpp.
Referenced by Bandwidth(), Evaluate(), and ToString().
1.8.6