Reference material for VECTOR_COSINE_SIMILARITY function
cos(θ)
. VECTOR_COSINE_SIMILARITY
returns a value in the range [-1, 1]
. A vector cosine similarity of 1
means that the vectors are identical in direction. A similarity of 0
means that they are orthogonal and have no correlation. A similarity of -1
means that they point in opposite directions.
Parameter | Description | Supported input types |
---|---|---|
<array> | The first array used in the similarity calculation | Any array of numeric data types. |
<array> | The second array used in the similarity calculation. | Any array of numeric data types. |
array
arguments must have the same number of elements.
DOUBLE
similarity (DOUBLE PRECISION) |
---|
0.9838699100999074 |
similarity (DOUBLE PRECISION) |
---|
-0.9838699100999074 |
similarity (DOUBLE PRECISION) |
---|
0 |