VECTOR_L1_DISTANCE
functionsupportedAI & MLComputes the L1 distance between two vectors. L1 distance, also known as the Taxicab or Manhattan distance, is a measure of the distance between two points in a vector space. The distance is calculated by taking the sum of the absolute value of the differences of vector elements. The result is a value of zero or higher. If the distance is zero, the vectors are identical. The larger the distance, the farther apart the vectors are.
Syntax
VECTOR_L1_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 L1 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.