mlpack
gitmaster

CosineDistance Class Reference
The cosine distance (or cosine similarity). More...
Public Member Functions  
template < typename Archive >  
void  serialize (Archive &, const unsigned int) 
Serialize the class (there's nothing to save). More...  
Static Public Member Functions  
template < typename VecTypeA , typename VecTypeB >  
static double  Evaluate (const VecTypeA &a, const VecTypeB &b) 
Computes the cosine distance between two points. More...  
Detailed Description
The cosine distance (or cosine similarity).
It is defined by
and this class assumes the standard L2 inner product.
Definition at line 31 of file cosine_distance.hpp.
Member Function Documentation
◆ Evaluate()

static 
Computes the cosine distance between two points.
 Parameters

a First vector. b Second vector.
 Returns
 d(a, b).
◆ serialize()

inline 
Serialize the class (there's nothing to save).
Definition at line 46 of file cosine_distance.hpp.
The documentation for this class was generated from the following file:
 src/mlpack/core/kernels/cosine_distance.hpp
Generated by 1.8.13