Developer Guide and Reference

  • 2021.4
  • 09/27/2021
  • Public Content
Contents

Cosine distance

The Cosine distance is a measure of distance between two non-zero vectors of an inner product space.
Operation
Computational methods

Mathematical formulation

Computing
Given a set
U
of
n
feature vectors LaTex Math image. of dimension
k
and a set
V
of
m
feature vectors LaTex Math image. of dimension
k
, the problem is to compute the Cosine distance LaTex Math image. for any pair of input vectors:
LaTex Math image.
where LaTex Math image..
Computation method:
dense
The method defines Cosine distance metric, which is used in other algorithms for the distance computation. There is no separate computation mode to compute the distance manually.

Programming Interface

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.