News for hackers. Stuff that matters.
Re:Interesting data structures: the BK-tree by mshenfield on Monday April 03, 2017 @03:39PM (#14026352)
This issue also gets mentioned in the sklearn documentation [0]. The "curse of dimensionality" explains how high dimensional data tends to be close together, making efficient indexing on a distance metric difficult.

I feel like the poster-child for the frequency illusion. There was an article on 538 a few weeks ago that caught my interest which used cosine similarity (a non-metric distance function). I dove in, and started wondering if there were any ways to find nearest neighbors using cosine similarity efficiently. A week later, Facebook's Faiss implements something of a general purpose toolkit for indexing metric and not metric spaces to minimize storage. And now this. It's like the world is trying to tell me something!

[0] http://scikit-learn.org/stable/modules/neighbors.html#k-d-tr...

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.

Re:Interesting data structures: the BK-tree by mack73 on Tuesday April 04, 2017 @01:03AM (#14029613)
Sounds like you're only two-three LSD trips from a major break-through. Good luck man!