gaspiman/cosine_similarity

Wrong distance calculated

Closed this issue · 2 comments

https://play.golang.org/p/dRwrMgXPjJ1

Should returns 0 but returns 1.

Hi @bobvanluijt ,

Just to be clear it should return 1.
This is Cosine Similarity function for cosine distance you need to distract it from 1 as

cosine distance = 1 - cosine similarity

I see, thanks @bgokden