23 #ifndef __MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP
24 #define __MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP
50 template<
typename VecType>
51 static double Evaluate(
const VecType& a,
const VecType& b);
58 std::ostringstream convert;
59 convert <<
"CosineDistance [" <<
this <<
"]" << std::endl;
77 #include "cosine_distance_impl.hpp"
This is a template class that can provide information about various kernels.
The cosine distance (or cosine similarity).
static double Evaluate(const VecType &a, const VecType &b)
Computes the cosine distance between two points.
std::string ToString() const
Returns a string representation of this object.
static const bool IsNormalized
If true, then the kernel is normalized: K(x, x) = K(y, y) = 1 for all x.