1

LSH is a popular algorithm for ANN.

k-d Tree is maybe the most popular solution for exactly solving NN.

However, reading this survey I found these structures and I don't understand which ones are for solving NN or ANN:

  • quad/oct-tree
  • ball-tree
  • R-Tree
  • M-Tree

I didn't found any survey dedicated to ANN, so I think that all of these are for NN and for metric spaces (they cannot be used for non-metric spaces).

gsamaras
  • 71,951
  • 46
  • 188
  • 305
justHelloWorld
  • 6,478
  • 8
  • 58
  • 138
  • Can you please edit your question to contain a single question? I can only post one answer. If you think then that need to ask more, post a new q. ;) – gsamaras Oct 27 '16 at 21:54
  • Now there is no super obvious question. I guess you mean which of the 4 structures you have are used for Nearest Neigbor searching? – gsamaras Oct 28 '16 at 18:34
  • No, my question is: which of these stucrure are used for EXACT NN and which for APPPROXIMATE NN? – justHelloWorld Oct 28 '16 at 18:35

1 Answers1

2

First, let me confirm that quadtree, Ball tree, R-tree and M-tree can be used for Nearest Neighbor Search (NNS).

Now if a structure can support NNS, then it can support approximate Nearest Neighbor search.

Take for example the kd-tree, which you might know better; it collects point-candidates that may be the answer to a query. If you check all the possible candidates, then you can answer the exact Nearest Neighbor query. If you check some of the candidates, then you can answer the approximate Nearest Neighbor query.

Hope that helps! :)

gsamaras
  • 71,951
  • 46
  • 188
  • 305
  • I suggested an edit but it was rolled back to a previous version. Am I right in suggesting that some candidates will lead to an approx NN result? It seems right to me – fzk May 25 '17 at 02:59
  • @fzk yes, thank you very much and for the upvote! =) – gsamaras May 25 '17 at 09:46
  • is https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.KDTree.html an absolute NN? – seralouk Nov 24 '20 at 15:11