News for hackers. Stuff that matters.
Re:Interesting data structures: the BK-tree by yorwba on Tuesday April 04, 2017 @03:56AM (#14030448)
If you want to use the triangle inequality with cosine similarity, just use angles instead: https://en.wikipedia.org/wiki/Cosine_similarity#Angular_dist...

EDIT: Deleted calculation about approximating arccos(z) <= arccos(x) + arccos(y) by cos(arccos(z)) <= cos(arccos(x) + arccos(y)) <= xy - (1-x^2)(1-y^2), completely disregarding that cos is a decreasing function in the relevant interval.

There are no comments on this comment yet.