Finds the k nearest neighbours for every point in a given dataset in O(N log N) time using Arya and Mount's ANN library (v1.1.3). There is support for approximate as well as exact searches, fixed radius searches and bd as well as kd trees.
This package implements nearest neighbors for the Euclidean (L2) metric.
For further details on the underlying ANN library, see http://www.cs.umd.edu/~mount/ANN.
PyANN was written to be the Python equivalent of the R package RANN. For further details on the R implementation, see RANN.
PyANN requires Python>=3.6 due to the use of type annotations in the source code, which was implemented in Python 3.6.
The recommendation is to install the latest released version from PyPI by doing:
pip install pyann
To install PyANN from source you need Cython and setuptools >=18.0 in addition to the normal dependencies above. Cython can be installed from PyPI:
pip install cython
In the PyANN directory (same one where you found this file after cloning the git repo), first execute:
make
then:
python setup.py install
Requires
Install g++, gcc, and mingw32-make
mingw-get install gcc g++ mingw32-make
Install all required dependencies using pip
:
"%PYTHONPATH%/python.exe" -m pip install --upgrade setuptools cython numpy pandas
where %PYTHONPATH%
is the path to your python.exe
.
In the PyANN directory (same one where you found this file after cloning the git repo), first execute:
cd pyann\annlib\lib
%MAKE%
where %MAKE%
is the path to your mingw32-make.exe
then:
cd C:\projects\pyann
"%PYTHONPATH%/python.exe" -m pip install .
Documentation for PyANN is available at: https://pyann.readthedocs.io/en/latest/
Please feel free to:
- submit suggestions and bug-reports at: https://github.com/annacnev/pyann/issues
- send pull requests after forking: https://github.com/annacnev/pyann/
- e-mail the maintainer: annanev@umich.edu
see COPYRIGHT and LICENSE files for copyright and license information.