Cosine Distance. Defined as 1 - cosine similarity.
We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
of COSINE distance. Our algorithms have been more optimized for
DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
mathematically equivalent to COSINE distance and results in the same
ranking.
DotProductDistance
Dot Product Distance. Defined as a negative of the dot product.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This documentation covers the `DistanceMeasureType` enum within the Google Cloud AI Platform v1beta1 API."],["The `DistanceMeasureType` enum defines the various methods for calculating distance in nearest neighbor searches, with available options being `CosineDistance`, `DotProductDistance`, `SquaredL2Distance`, and `Unspecified`."],["It is recommended to use `DOT_PRODUCT_DISTANCE` along with `UNIT_L2_NORM` instead of `COSINE_DISTANCE` for improved performance and equivalent ranking results."],["`DotProductDistance` is calculated as the negative of the dot product, while `SquaredL2Distance` represents the Euclidean distance."],["The latest version available is beta21 and this enum is located in the `Google.Cloud.AIPlatform.V1Beta1` namespace."]]],[]]