VECTOR_L2_DISTANCE
functionsupportedAI & MLComputes the L2 distance between two vectors. L2 distance, also known as the Euclidean distance, is a measure of the distance between two vectors in a vector space. The distance is calculated by taking the square root of the sum of the squared differences of vector elements. The distance can be a value of zero or higher. If the distance is zero, the vectors are identical. A larger distance indicates that the vectors are farther apart.
Syntax
VECTOR_L2_DISTANCE( <vector>, <vector> )
Parameters
| Name | Required | Description |
|---|---|---|
vector | required | The VECTOR value to calculate the distance from. |
vector | required | The VECTOR value to calculate the distance to. |
Returns
Returns the distance between the two input vectors as a FLOAT value.
Usage notes
- Vector functions are optimized in a way that can reduce floating point precision. This function’s results have a margin of error up to 1e-4.