MyNixOS website logo
Description

Non Metric Space (Approximate) Library.

A Non-Metric Space Library ('NMSLIB' <https://github.com/nmslib/nmslib>) wrapper, which according to the authors "is an efficient cross-platform similarity search library and a toolkit for evaluation of similarity search methods. The goal of the 'NMSLIB' <https://github.com/nmslib/nmslib> Library is to create an effective and comprehensive toolkit for searching in generic non-metric spaces. Being comprehensive is important, because no single method is likely to be sufficient in all cases. Also note that exact solutions are hardly efficient in high dimensions and/or non-metric spaces. Hence, the main focus is on approximate methods". The wrapper also includes Approximate Kernel k-Nearest-Neighbor functions based on the 'NMSLIB' <https://github.com/nmslib/nmslib> 'Python' Library.

nmslibR (Non Metric Space Library in R)


The nmslibR package is a wrapper of the Non-Metric Space Library (NMSLIB)python package. More details on the functionality of the nmslibR package can be found in the blog-post and in the package Documentation.


Reference:

https://github.com/nmslib/nmslib

https://github.com/nmslib/nmslib/blob/master/manual/latex/manual.pdf


System Requirements


  • Python (>= 2.7)

All modules should be installed in the default python configuration (the configuration that the R-session displays as default), otherwise errors will occur during the nmslibR package installation (reticulate::py_discover_config() might be useful here).


The installation notes for Linux, Macintosh, Windows are based on Python 3.


Debian/Ubuntu


Installation of the system requirements,



sudo apt-get install python3-pip

sudo pip3 install --upgrade setuptools

sudo pip3 install -U numpy

sudo pip3 install --upgrade scipy

sudo apt-get install libboost-all-dev libgsl0-dev libeigen3-dev

sudo apt-get install cmake

pip3 install --upgrade pybind11

sudo pip3 install nmslib


Fedora


Installation of the system requirements,



dnf install python3-pip

sudo pip3 install --upgrade setuptools

sudo pip3 install -U numpy

sudo pip3 install --upgrade scipy

yum install python3-devel

yum install boost-devel

yum install gsl-devel

yum install eigen3-devel

pip3 install --upgrade pybind11

sudo pip3 install nmslib


Macintosh OSX


Upgrade python to version 3 using,


brew upgrade python


Install the requirements,



sudo pip3 install --upgrade pip setuptools wheel

sudo pip3 install -U numpy

sudo pip3 install --upgrade scipy

brew install boost

brew install eigen

brew install gsl

brew install cmake

brew link --overwrite cmake

pip3 install --upgrade pybind11

sudo pip3 install nmslib


After a successful installation of the requirements the user should open an R session and give the following reticulate command to change to the relevant (brew-python) directory (otherwise the nmslibR package won't work properly),



reticulate::use_python('/usr/local/bin/python3')



and then,



reticulate::py_discover_config()



to validate that a user is in the python version where nmslibR is installed.



Windows OS (the instructions were tested with the version 1.0.0 of the R package, thus use with caution)


First download of get-pip.py for windows


Update the Environment variables ( Control Panel >> System and Security >> System >> Advanced system settings >> Environment variables >> System variables >> Path >> Edit ) by adding ( for instance in case of python 2.7 ),



C:\Python36;C:\Python36\Scripts



Install the Build Tools for Visual Studio


Open the Command prompt (console) and install / upgrade the system requirements,



pip3 install --upgrade pip setuptools wheel

pip3 install -U numpy

pip3 install --upgrade scipy


Installation of cmake


First download cmake for Windows, win64-x64 Installer. Once the file is downloaded run the .exe file and during installation make sure to add CMake to the system PATH for all users.


Then install the nmslib library,



pip3 install --upgrade pybind11

pip3 install nmslib


Installation of the nmslibR package


To install the package from CRAN use,



install.packages('nmslibR')



and to download the latest version from Github use the install_github function of the remotes package,


remotes::install_github(repo = 'mlampros/nmslibR')


Use the following link to report bugs/issues,

https://github.com/mlampros/nmslibR/issues


Citation:

If you use the code of this repository in your paper or research please cite both nmslibR and the original articles / softwarehttps://CRAN.R-project.org/package=nmslibR/citation.html:


@Manual{,
  title = {{nmslibR}: Non Metric Space (Approximate) Library in R},
  author = {Lampros Mouselimis},
  year = {2021},
  note = {R package version 1.0.7},
  url = {https://CRAN.R-project.org/package=nmslibR},
}

Metadata

Version

1.0.7

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows