HAMMING_SIMILARITY
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Calculates the similarity between two quantized (binary) embeddings using the normalized Hamming distance.
bytea1: The first binary-quantized vector.bytea2: The second binary-quantized vector.
Returns a double-precision value between 0 and 1, where 1 indicates identical binary vectors.
- Both inputs must be bytea values of the same length.
- This function provides fast, approximate similarity. Use exact methods when precision is critical.
Compare two binary-quantized vectors.
Returns 0.75, indicating 3 out of 4 bits match between the two vectors.