MLPACK
1.0.4
|
The standard Laplacian kernel. More...
Public Member Functions | |
LaplacianKernel () | |
Default constructor; sets bandwidth to 1.0. | |
LaplacianKernel (double bandwidth) | |
Construct the Laplacian kernel with a custom bandwidth. | |
double | Bandwidth () const |
Get the bandwidth. | |
double & | Bandwidth () |
Modify the bandwidth. | |
template<typename VecType > | |
double | Evaluate (const VecType &a, const VecType &b) const |
Evaluation of the Laplacian kernel. | |
double | Evaluate (double t) const |
Evaluation of the Laplacian kernel using a double precision argument. | |
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 | ( | ) | const [inline] |
double& mlpack::kernel::LaplacianKernel::Bandwidth | ( | ) | [inline] |
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. |
Definition at line 70 of file laplacian_kernel.hpp.
References bandwidth, and mlpack::metric::LMetric< Power, TakeRoot >::Evaluate().
double mlpack::kernel::LaplacianKernel::Evaluate | ( | double | t | ) | const [inline] |
Evaluation of the Laplacian kernel using a double precision argument.
t | double value. |
Definition at line 83 of file laplacian_kernel.hpp.
References bandwidth.
double mlpack::kernel::LaplacianKernel::bandwidth [private] |
Kernel bandwidth.
Definition at line 96 of file laplacian_kernel.hpp.
Referenced by Bandwidth(), and Evaluate().