pygsp icon indicating copy to clipboard operation
pygsp copied to clipboard

refactor NN graph building (included in #43)

Open naspert opened this issue 6 years ago • 5 comments

naspert avatar Mar 19 '18 10:03 naspert

Coverage Status

Coverage increased (+0.6%) to 82.579% when pulling a562896516c75514c1522337e12188c83f9dd57c on naspert:nn_refactor into e696d9fbe2744c8e6c8ffcdd692db411cf34ed7c on epfl-lts2:master.

coveralls avatar Mar 19 '18 14:03 coveralls

Thanks for merging the knn and radius matrix build :+1:

mdeff avatar Mar 29 '18 11:03 mdeff

This might be an interesting alternative to FLANN: https://github.com/spotify/annoy

bricaud avatar Apr 02 '18 19:04 bricaud

Thanks @bricaud :) There's actually a whole lot of libraries, see e.g. this benchmark. We currently support the following backends (thanks to @naspert work):

  • scipy pdist (brute force), KDTree and cKDTree, because scipy is a hard requirement and will be installed for all users
  • nmslib, because it's the fastest according to the benchmark
  • flann, because it was there before and people know it

@bricaud: which kNN libraries do you have experience with? Would you recommend any? @naspert: do you see any reason to use KDTree over cKDTree?

mdeff avatar Apr 02 '18 20:04 mdeff

cKDTree is the same as kdtree, with a C backend. It generates the same results, much faster so no good reason to prefer kdtree over ckdtree. If you are looking into having a dataset with many dimensions, nmslib will be faster.

naspert avatar Apr 09 '18 07:04 naspert