MLPACK  1.0.8
cosine_distance.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP
24 #define __MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP
25 
26 #include <mlpack/core.hpp>
27 
28 namespace mlpack {
29 namespace kernel {
30 
41 {
42  public:
50  template<typename VecType>
51  static double Evaluate(const VecType& a, const VecType& b);
52 };
53 
55 template<>
57 {
58  public:
60  static const bool IsNormalized = true;
61 };
62 
63 }; // namespace kernel
64 }; // namespace mlpack
65 
66 // Include implementation.
67 #include "cosine_distance_impl.hpp"
68 
69 #endif
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.
static const bool IsNormalized
If true, then the kernel is normalized: K(x, x) = K(y, y) = 1 for all x.