Question about building the trees.
beyondguo opened this issue · comments
Hi @erikbern ,
Thank you so much for your clear illustration in the blog and repo about Annoy, which I learned a lot about ANN.
I have a simple question:
After I randomly pick two points (A & B) in the space and decide a hyperplane to split the space into two parts, how to allocate all the other points into these two parts?
Need I compute the distance between A/B with all the other points in the space to decide which part each point should belong to? Like a brute forece search? That will be so slow.
If not, how does Annoy implement it?
I'm not quite familier with C++, so could you please expalin it breifly to me? Or could you pls tell me the exact position of code in the Annoy repo?
I would appreciate it if you could reply! Thanks!
Need I compute the distance between A/B with all the other points in the space to decide which part each point should belong to? Like a brute forece search? That will be so slow.
Yes. It's not slow – it's just a linear scan