other versions
- jessie 1.0.10-1
mlpack::kernel::GaussianKernel(3) | MLPACK | mlpack::kernel::GaussianKernel(3) |
NAME¶
mlpack::kernel::GaussianKernel - The standard Gaussian kernel.SYNOPSIS¶
Public Member Functions¶
GaussianKernel ()
Private Attributes¶
double bandwidth
Detailed Description¶
The standard Gaussian kernel. Given two vectors $ x $, $ y $, and a bandwidth $ $ (set in the constructor), The implementation is all in the header file because it is so simple. Definition at line 43 of file gaussian_kernel.hpp.Constructor & Destructor Documentation¶
mlpack::kernel::GaussianKernel::GaussianKernel () [inline]¶
Default constructor; sets bandwidth to 1.0. Definition at line 49 of file gaussian_kernel.hpp.mlpack::kernel::GaussianKernel::GaussianKernel (const doublebandwidth) [inline]¶
Construct the Gaussian kernel with a custom bandwidth. Parameters:bandwidth The bandwidth of the kernel ( $$).
Definition at line 57 of file gaussian_kernel.hpp.
Member Function Documentation¶
double mlpack::kernel::GaussianKernel::Bandwidth () const [inline]¶
Get the bandwidth. Definition at line 120 of file gaussian_kernel.hpp. References bandwidth.void mlpack::kernel::GaussianKernel::Bandwidth (const doublebandwidth) [inline]¶
Modify the bandwidth. This takes an argument because we must update the precalculated constant (gamma). Definition at line 124 of file gaussian_kernel.hpp. References bandwidth, and gamma.template<typename VecType > double mlpack::kernel::GaussianKernel::ConvolutionIntegral (const VecType &a, const VecType &b) [inline]¶
Obtain a convolution integral of the Gaussian kernel. Parameters:a,first vector
b,second vector
Returns:
the convolution integral
Definition at line 112 of file gaussian_kernel.hpp.
References Evaluate(), mlpack::metric::LMetric< Power, TakeRoot
>::Evaluate(), and Normalizer().
template<typename VecType > double mlpack::kernel::GaussianKernel::Evaluate (const VecType &a, const VecType &b) const [inline]¶
Evaluation of the Gaussian 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 ( $$) specified in the
constructor.
Definition at line 74 of file gaussian_kernel.hpp.
References mlpack::metric::LMetric< Power, TakeRoot >::Evaluate(), and
gamma.
Referenced by ConvolutionIntegral().
double mlpack::kernel::GaussianKernel::Evaluate (const doublet) const [inline]¶
Evaluation of the Gaussian kernel given the distance between two points. Parameters:t The distance between the two points the kernel
is evaluated on.
Returns:
K(t) using the bandwidth ( $$) specified in the
constructor.
Definition at line 87 of file gaussian_kernel.hpp.
References gamma.
double mlpack::kernel::GaussianKernel::Gamma () const [inline]¶
Get the precalculated constant. Definition at line 131 of file gaussian_kernel.hpp. References gamma.double mlpack::kernel::GaussianKernel::Normalizer (const size_tdimension) [inline]¶
Obtain the normalization constant of the Gaussian kernel. Parameters:dimension
Returns:
the normalization constant
Definition at line 99 of file gaussian_kernel.hpp.
References bandwidth, and M_PI.
Referenced by ConvolutionIntegral().
std::string mlpack::kernel::GaussianKernel::ToString () const [inline]¶
Convert object to string. Definition at line 134 of file gaussian_kernel.hpp. References bandwidth.Member Data Documentation¶
double mlpack::kernel::GaussianKernel::bandwidth [private]¶
Kernel bandwidth. Definition at line 144 of file gaussian_kernel.hpp. Referenced by Bandwidth(), Normalizer(), and ToString().double mlpack::kernel::GaussianKernel::gamma [private]¶
Precalculated constant depending on the bandwidth; $ mma = -ac{1}{2 ^2} $. Definition at line 148 of file gaussian_kernel.hpp. Referenced by Bandwidth(), Evaluate(), and Gamma().Author¶
Generated automatically by Doxygen for MLPACK from the source code.Tue Sep 9 2014 | Version 1.0.10 |