13 #ifndef MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP 14 #define MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP 41 template<
typename VecTypeA,
typename VecTypeB>
42 static double Evaluate(
const VecTypeA& a,
const VecTypeB& b);
45 template<
typename Archive>
55 static const bool IsNormalized =
true;
58 static const bool UsesSquaredDistance =
false;
65 #include "cosine_distance_impl.hpp" void serialize(Archive &, const unsigned int)
Serialize the class (there's nothing to save).
This is a template class that can provide information about various kernels.
The cosine distance (or cosine similarity).
The core includes that mlpack expects; standard C++ includes and Armadillo.
static double Evaluate(const VecTypeA &a, const VecTypeB &b)
Computes the cosine distance between two points.