Method of calculating similarity
Closed this issue · 2 comments
greyovo commented
I checked out class PhotoSearcherModel
and class PhotoSearcher
, and found that when calculating similarity, you end up using spherical_dist_loss
, which contradicts the introduction of "Calculating cosine similarity" in the README diagram. I am a little confused and wonder if you could give some insight about that. :)
Thanks in advance.
mazzzystar commented
@greyovo You can find that in the code I've implemented both cosine sim
and shperical dist
, I tested with a few keywords and found the later ranking seems to be better, this happens in two ways:
- In some cases, the ranking based on spherical distance is more reasonable.
- The value distribution of cosine similarity is more dense, meaning that the differences in cosine values between different photos are smaller than those in spherical distance, which makes me worry about a higher degree of uncertainty.
greyovo commented
I see. Thanks for the reply.