4 ms·
I may not remember this correctly, but normalizing to -127..127 may be counterproductive. When normalized to -1..1, all of Euclidian, dot product and cosine sim
by cluckindan 1y ago
I may not remember this correctly, but normalizing to -127..127 may be counterproductive. When normalized to -1..1, all of Euclidian, dot product and cosine similarities produce the same ranking, allowing you to calculate similarity without having to calculate cosines.
- antirez 1y agoRedis stores the magnitude of the vector and stores the vector in normalized form, so indeed we just do dot product :) But yet we can reconstruct the vector back. I totally forgot to mention this in the blog post!