Similarity formula needs explanation
xxxpsyduck opened this issue · comments
Please explain the following formula:
sim = (1. + np.dot(emb1, emb2)) / 2
why using this instead of cosine similarity?
Since we are computing similarity of normed embeddings dot product is equal to cosine distance in this case.
(1 + sim )/2
formula is to normalize similarity in range [0…1] instead of [-1…1], it's just for convenience of representation