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>
65#include "cosine_distance_impl.hpp"
The cosine distance (or cosine similarity).
static double Evaluate(const VecTypeA &a, const VecTypeB &b)
Computes the cosine distance between two points.
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.
static const bool UsesSquaredDistance
If true, then the kernel include a squared distance, ||x - y||^2 .
static const bool IsNormalized
If true, then the kernel is normalized: K(x, x) = K(y, y) = 1 for all x.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.