|
mlpack
master
|
The inner product metric, IPMetric, takes a given Mercer kernel (KernelType), and when Evaluate() is called, returns the distance between the two points in kernel space: More...

Public Member Functions | |
| IPMetric () | |
| Create the IPMetric without an instantiated kernel. More... | |
| IPMetric (KernelType &kernel) | |
| Create the IPMetric with an instantiated kernel. More... | |
| ~IPMetric () | |
| Destroy the IPMetric object. More... | |
| template<typename VecTypeA , typename VecTypeB > | |
| VecTypeA::elem_type | Evaluate (const VecTypeA &a, const VecTypeB &b) |
| Evaluate the metric. More... | |
| const KernelType & | Kernel () const |
| Get the kernel. More... | |
| KernelType & | Kernel () |
| Modify the kernel. More... | |
| template<typename Archive > | |
| void | Serialize (Archive &ar, const unsigned int version) |
| Serialize the metric. More... | |
Private Attributes | |
| KernelType * | kernel |
| The kernel we are using. More... | |
| bool | kernelOwner |
| If true, we are responsible for deleting the kernel. More... | |
The inner product metric, IPMetric, takes a given Mercer kernel (KernelType), and when Evaluate() is called, returns the distance between the two points in kernel space:
| KernelType | Type of Kernel to use. This must be a Mercer kernel (positive definite), otherwise the metric may not be valid. |
Definition at line 32 of file ip_metric.hpp.
| mlpack::metric::IPMetric< KernelType >::IPMetric | ( | ) |
Create the IPMetric without an instantiated kernel.
| mlpack::metric::IPMetric< KernelType >::IPMetric | ( | KernelType & | kernel | ) |
Create the IPMetric with an instantiated kernel.
| mlpack::metric::IPMetric< KernelType >::~IPMetric | ( | ) |
Destroy the IPMetric object.
| VecTypeA::elem_type mlpack::metric::IPMetric< KernelType >::Evaluate | ( | const VecTypeA & | a, |
| const VecTypeB & | b | ||
| ) |
Evaluate the metric.
| VecTypeA | Type of first vector. |
| VecTypeB | Type of second vector. |
| a | First vector. |
| b | Second vector. |
|
inline |
Get the kernel.
Definition at line 57 of file ip_metric.hpp.
|
inline |
Modify the kernel.
Definition at line 59 of file ip_metric.hpp.
| void mlpack::metric::IPMetric< KernelType >::Serialize | ( | Archive & | ar, |
| const unsigned int | version | ||
| ) |
Serialize the metric.
Referenced by mlpack::metric::IPMetric< kernel::EpanechnikovKernel >::Kernel().
|
private |
The kernel we are using.
Definition at line 67 of file ip_metric.hpp.
Referenced by mlpack::metric::IPMetric< kernel::EpanechnikovKernel >::Kernel().
|
private |
If true, we are responsible for deleting the kernel.
Definition at line 69 of file ip_metric.hpp.
1.8.11