mlpack::kernel::CosineDistance(3) The cosine distance (or cosine similarity).

SYNOPSIS


Public Member Functions


std::string ToString () const
Returns a string representation of this object.

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

\.PP 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) [static]

Computes the cosine distance between two points.

Parameters:

a First vector.
b Second vector.

Returns:

d(a, b).

std::string mlpack::kernel::CosineDistance::ToString () const [inline]

Returns a string representation of this object.

Definition at line 56 of file cosine_distance.hpp.

Author

Generated automatically by Doxygen for MLPACK from the source code.