facebookresearch / pysparnn

Approximate Nearest Neighbor Search for Sparse Data in Python!
Other
916 stars 145 forks source link

Interpolation NN #9

Closed ainglot closed 7 years ago

ainglot commented 7 years ago

Hello, I have spatial data (points in Cartesian x, y, z.). I need to designate new value “z” using algorithm Natural Neighbour. Should I use PySparNN or different library? I ask because I haven’t been able to install annoy in win7.

spencebeecher commented 7 years ago

Great question! While you definitely can use pysparnn - I would recommend that you use one of the methods in scikit-learn. http://scikit-learn.org/stable/modules/classes.html#module-sklearn.neighbors

KD-Tree or Ball Tree should do very well for you. Those should be easy to install.

PySparNN works very well in large dimensions where the number of positive entries per record is small. Like a text doccument - there are many possible words (dimensions) but where the number of positive entries per record is small (0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,1,1).