SYNOPSIS

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 (const double t) const

Evaluation of the Laplacian kernel given the distance between two points. std::string ToString () const

Return a string representation of the kernel.

Private Attributes

double bandwidth

Kernel bandwidth.

Detailed Description

The standard Laplacian kernel.

Given two vectors $ x $, $ y $, and a bandwidth $ \mu $ (set in the constructor),

\[ K(x, y) = \xp(-ac{|| x - y ||}{\mu}). \].PP The implementation is all in the header file because it is so simple.

Definition at line 40 of file laplacian_kernel.hpp.

Constructor & Destructor Documentation

mlpack::kernel::LaplacianKernel::LaplacianKernel ()\fC [inline]\fP

Default constructor; sets bandwidth to 1.0.

Definition at line 46 of file laplacian_kernel.hpp.

mlpack::kernel::LaplacianKernel::LaplacianKernel (doublebandwidth)\fC [inline]\fP

Construct the Laplacian kernel with a custom bandwidth.

Parameters:

bandwidth The bandwidth of the kernel ( $\mu$).

Definition at line 54 of file laplacian_kernel.hpp.

Member Function Documentation

double mlpack::kernel::LaplacianKernel::Bandwidth () const\fC [inline]\fP

Get the bandwidth.

Definition at line 91 of file laplacian_kernel.hpp.

References bandwidth.

double& mlpack::kernel::LaplacianKernel::Bandwidth ()\fC [inline]\fP

Modify the bandwidth.

Definition at line 93 of file laplacian_kernel.hpp.

References bandwidth.

template<typename VecType > double mlpack::kernel::LaplacianKernel::Evaluate (const VecType &a, const VecType &b) const\fC [inline]\fP

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.

Template Parameters:

VecType Type of vector (likely arma::vec or arma::spvec).

Parameters:

a First vector.

b Second vector.

Returns:

K(a, b) using the bandwidth ( $\mu$) 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::Evaluate (const doublet) const\fC [inline]\fP

Evaluation of the Laplacian kernel given the distance between two points.

Parameters:

t The distance between the two points the kernel should be evaluated on.

Returns:

K(t) using the bandwidth ( $\mu$) specified in the constructor.

Definition at line 84 of file laplacian_kernel.hpp.

References bandwidth.

std::string mlpack::kernel::LaplacianKernel::ToString () const\fC [inline]\fP

Return a string representation of the kernel.

Definition at line 96 of file laplacian_kernel.hpp.

References bandwidth.

Member Data Documentation

double mlpack::kernel::LaplacianKernel::bandwidth\fC [private]\fP

Kernel bandwidth.

Definition at line 106 of file laplacian_kernel.hpp.

Referenced by Bandwidth(), Evaluate(), and ToString().

Author

Generated automatically by Doxygen for MLPACK from the source code.