hnswlib
hnswlib copied to clipboard
question about cos-similarity
hi, I've been using hnsw for a while, it's a nice project, good work! however, recently I have a question about it. I've been using cos, l1, l2 for distance calculation, that reminds me of sklearn cosine similarity. in sklearn, you can control the distance(I forgot the parameter's name), that means you can filter your result when you are using cos-similarity to find items with shorter distance in between. However, in hnsw, it seems we can only set 'cos' to use cosine similarity and get the default results. Just wanna know am I right here? is there any way we can control the cos distance in hnsw? thank you for helping.
Hi @652994331, sorry for a late reply, I've missed this issue for some reason. I am not sure I understood it. The cosine similarity that I know does not have parameters. Can you provide a link to sklearn?