mlpack::kernel::CosineDistance Class Reference

The cosine distance (or cosine similarity). More...

List of all members.

Static Public Member Functions

template<typename VecType >
static double Evaluate (const VecType &a, const VecType &b)
 Computes the cosine distance between two points.

Detailed Description

The cosine distance (or cosine similarity).

It is defined by

\[ d(a, b) = \frac{a^T b}{|| a || || b ||} \]

and this class assumes the standard L2 inner product.

Definition at line 40 of file cosine_distance.hpp.


Member Function Documentation

template<typename VecType >
static double mlpack::kernel::CosineDistance::Evaluate ( const VecType &  a,
const VecType &  b 
) [inline, static]

Computes the cosine distance between two points.

Parameters:
a First vector.
b Second vector.
Returns:
d(a, b).

The documentation for this class was generated from the following file:

Generated on 13 Aug 2014 for MLPACK by  doxygen 1.6.1