MLPACK
1.0.4
|
The Epanechnikov kernel, defined as. More...
Public Member Functions | |
EpanechnikovKernel (const double bandwidth=1.0) | |
Instantiate the Epanechnikov kernel with the given bandwidth (default 1.0). | |
template<typename VecType > | |
double | ConvolutionIntegral (const VecType &a, const VecType &b) |
Obtains the convolution integral [integral of K(||x-a||) K(||b-x||) dx] for the two vectors. | |
template<typename Vec1Type , typename Vec2Type > | |
double | Evaluate (const Vec1Type &a, const Vec2Type &b) |
Evaluate the Epanechnikov kernel on the given two inputs. | |
double | Evaluate (const double t) |
Evaluate the kernel not for two points but for a numerical value. | |
double | Normalizer (const size_t dimension) |
Compute the normalizer of this Epanechnikov kernel for the given dimension. | |
Private Attributes | |
double | bandwidth |
Bandwidth of the kernel. | |
double | inverseBandwidthSquared |
Cached value of the inverse bandwidth squared (to speed up computation). |
The Epanechnikov kernel, defined as.
where is the bandwidth the of the kernel (defaults to 1.0).
Definition at line 39 of file epanechnikov_kernel.hpp.
mlpack::kernel::EpanechnikovKernel::EpanechnikovKernel | ( | const double | bandwidth = 1.0 | ) | [inline] |
Instantiate the Epanechnikov kernel with the given bandwidth (default 1.0).
bandwidth | Bandwidth of the kernel. |
Definition at line 47 of file epanechnikov_kernel.hpp.
double mlpack::kernel::EpanechnikovKernel::ConvolutionIntegral | ( | const VecType & | a, |
const VecType & | b | ||
) |
Obtains the convolution integral [integral of K(||x-a||) K(||b-x||) dx] for the two vectors.
VecType | Type of vector (arma::vec, arma::spvec should be expected). |
a | First vector. |
b | Second vector. |
double mlpack::kernel::EpanechnikovKernel::Evaluate | ( | const Vec1Type & | a, |
const Vec2Type & | b | ||
) |
Evaluate the Epanechnikov kernel on the given two inputs.
a | One input vector. |
b | The other input vector. |
double mlpack::kernel::EpanechnikovKernel::Evaluate | ( | const double | t | ) |
Evaluate the kernel not for two points but for a numerical value.
double mlpack::kernel::EpanechnikovKernel::Normalizer | ( | const size_t | dimension | ) |
Compute the normalizer of this Epanechnikov kernel for the given dimension.
dimension | Dimension to calculate the normalizer for. |
double mlpack::kernel::EpanechnikovKernel::bandwidth [private] |
Bandwidth of the kernel.
Definition at line 87 of file epanechnikov_kernel.hpp.
double mlpack::kernel::EpanechnikovKernel::inverseBandwidthSquared [private] |
Cached value of the inverse bandwidth squared (to speed up computation).
Definition at line 89 of file epanechnikov_kernel.hpp.