DistanceFunction Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a list of well known distance functions that can be used to compare vectors.
public static class DistanceFunction
type DistanceFunction = class
Public Class DistanceFunction
- Inheritance
-
DistanceFunction
Remarks
Not all Vector Store connectors support all distance functions and some connectors may support additional distance functions that are not defined here. See the documentation for each connector for more information on what is supported.
Fields
CosineDistance |
The cosine (angular) similarity between two vectors. |
CosineSimilarity |
The cosine (angular) similarity between two vectors. |
DotProductSimilarity |
Measures both the length and angle between two vectors. |
EuclideanDistance |
Measures the Euclidean distance between two vectors. |
EuclideanSquaredDistance |
Measures the Euclidean squared distance between two vectors. |
Hamming |
Number of differences between vectors at each dimensions. |
ManhattanDistance |
Measures the Manhattan distance between two vectors. |