Go to the documentation of this file.
12 #ifndef MLPACK_CORE_KERNELS_EPANECHNIKOV_KERNEL_HPP
13 #define MLPACK_CORE_KERNELS_EPANECHNIKOV_KERNEL_HPP
40 inverseBandwidthSquared(1.0 / (bandwidth * bandwidth))
51 template<
typename VecTypeA,
typename VecTypeB>
52 double Evaluate(
const VecTypeA& a,
const VecTypeB& b)
const;
82 template<
typename VecTypeA,
typename VecTypeB>
95 template<
typename Archive>
96 void serialize(Archive& ar,
const unsigned int version);
102 double inverseBandwidthSquared;
120 #include "epanechnikov_kernel_impl.hpp"
This is a template class that can provide information about various kernels.
static const bool IsNormalized
If true, then the kernel is normalized: K(x, x) = K(y, y) = 1 for all x.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &ar, const unsigned int version)
Serialize the kernel.
double Evaluate(const VecTypeA &a, const VecTypeB &b) const
Evaluate the Epanechnikov kernel on the given two inputs.
The Epanechnikov kernel, defined as.
double ConvolutionIntegral(const VecTypeA &a, const VecTypeB &b)
Obtains the convolution integral [integral of K(||x-a||) K(||b-x||) dx] for the two vectors.
double GradientForSquaredDistance(const double distanceSquared) const
Evaluate the Gradient of Epanechnikov kernel given that the squared distance between the two input po...
double Normalizer(const size_t dimension)
Compute the normalizer of this Epanechnikov kernel for the given dimension.
Linear algebra utility functions, generally performed on matrices or vectors.
double Gradient(const double distance) const
Evaluate the Gradient of Epanechnikov kernel given that the distance between the two input points is ...
double Evaluate(const double distance) const
Evaluate the Epanechnikov kernel given that the distance between the two input points is known.
EpanechnikovKernel(const double bandwidth=1.0)
Instantiate the Epanechnikov kernel with the given bandwidth (default 1.0).
static const bool UsesSquaredDistance
If true, then the kernel include a squared distance, ||x - y||^2 .