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 (const IPMetric &other) | |
| Copy the parameters of the given metric. 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... | |
| IPMetric & | operator= (const IPMetric &other) |
| Assign this metric to be a copy of the given metric. More... | |
template < typename Archive > | |
| void | serialize (Archive &ar, const uint32_t version) |
| Serialize the metric. 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.
| VecTypeA::elem_type 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 63 of file ip_metric.hpp.
|
inline |
Modify the kernel.
Definition at line 65 of file ip_metric.hpp.
Assign this metric to be a copy of the given metric.
| void serialize | ( | Archive & | ar, |
| const uint32_t | version | ||
| ) |
Serialize the metric.
Referenced by IPMetric< mlpack::kernel::CosineDistance >::Kernel().