nabor

R package wrapping libnabo: fast K Nearest Neighbor search for low dimensions

https://github.com/jefferis/nabor

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.2%) to scientific vocabulary

Keywords

libnabo nearest-neighbors r r-package
Last synced: 11 months ago · JSON representation

Repository

R package wrapping libnabo: fast K Nearest Neighbor search for low dimensions

Basic Info
Statistics
  • Stars: 21
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
libnabo nearest-neighbors r r-package
Created almost 12 years ago · Last pushed about 5 years ago
Metadata Files
Readme License

README.md

nabor

natverse CRAN_Status_Badge DOI Release Version Build Status Docs Downloads <!-- badges: end -->

R package nabor wraps libnabo, a fast K Nearest Neighbour library for low-dimensional spaces implemented in templated C++. In comparison with the widely used ANN library (wrapped by the RANN R package), libnabo is reported to be 5% to 20% faster with more compact data structures.

Quick start

```r

install (see below for details)

install.packages("nabor")

use

library(nabor)

help

?nabor ?knn

run examples

example(knn) example(WKNN)

run tests

library(testthat) test_package("nabor")

cite

citation("nabor") ```

nabor vs RANN

For R users nabor provides a function, knn, that is a drop in replacement for the nn2 function in the RANN R package. I have seen speedups of 2-3x fold for queries of interest (a few thousand points in 3d, k=1) when comparing nabor::knn and RANN::nn2. See ?knn for details.

Furthermore nabor provides a mechanism for reusing the k-d search tree structure for multiple queries. This is achieved by wrapping a libnabo k-d tree and associated points into a C++ class. This in turn is wrapped as an R reference class (by RcppModules) that can be used in R. See ?WKNN for details. The WKNNF class has the additional feature of using floats (4 bytes per coordinate) for the underlying storage, rather than the doubles used by R; this may be useful for large pointsets.

Installation

Released version from CRAN

The current stable version of the package is available from CRAN. The package requires compilation, but installing from CRAN allows mac and windows users without the full C++ compiler toolchain to install binary packages.

r install.packages("nabor")

Development version from github

The nabor package is known to compile from source with the standard C(++) compiler toolchains for R under MacOS X, Windows and Linux. See https://www.rstudio.com/products/rpackages/devtools/ for details of the developer toolchains needed for your platform.

Once you have installed the appropriate developer toolchain mentioned above, you can use the devtools package to install the development version of the package:

r if (!require("devtools")) install.packages("devtools") devtools::install_github("jefferis/nabor")

Dependencies

The nabor package includes libnabo and all of its dependencies (boost, via package BH) and Eigen (via package RcppEigen) and does not depend on any non-standard system libraries. It should therefore run out of the box on any mac/linux/windows system.

Acknowlegements

libnabo and therefore the nabor R package are released under the BSD 3 clause license. If you make use of nabor please cite the original authors:

```

citation('nabor')

Elseberg J, Magnenat S, Siegwart R and Nüchter A (2012). “Comparison of nearest-neighbor-search strategies and implementations for efficient shape registration.” Journal of Software Engineering for Robotics (JOSER), 3(1), pp. 2-12. ISSN 2035-3928.

A BibTeX entry for LaTeX users is

@Article{elsebergcomparison, title = {Comparison of nearest-neighbor-search strategies and implementations for efficient shape registration}, author = {J. Elseberg and S. Magnenat and R. Siegwart and A. N{\"u}chter}, journal = {Journal of Software Engineering for Robotics (JOSER)}, pages = {2--12}, volume = {3}, number = {1}, year = {2012}, issn = {2035-3928}, }

```

nabor also makes use of the tremendous Rcpp and RcppEigen packages – kudos to their authors!

Owner

  • Name: Gregory Jefferis
  • Login: jefferis
  • Kind: user
  • Location: Cambridge, United Kingdom
  • Company: MRC Laboratory of Molecular Biology

develops @natverse, directs collaborative @flyconnectome group at Dept of Zoology, joint head of Division of Neurobiology @ MRC LMB.

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 171
  • Total Committers: 1
  • Avg Commits per committer: 171.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Gregory Jefferis j****s@g****m 171

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 9
  • Total pull requests: 1
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 year
  • Total issue authors: 6
  • Total pull request authors: 1
  • Average comments per issue: 1.78
  • Average comments per pull request: 2.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jefferis (4)
  • barryrowlingson (1)
  • johanvdw (1)
  • eduardszoecs (1)
  • Teng-Qiu-Clustering (1)
  • Robinlovelace (1)
Pull Request Authors
  • jefferis (1)
Top Labels
Issue Labels
bug (2)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 7,317 last-month
  • Total docker downloads: 134,931
  • Total dependent packages: 18
    (may contain duplicates)
  • Total dependent repositories: 52
    (may contain duplicates)
  • Total versions: 7
  • Total maintainers: 1
cran.r-project.org: nabor

Wraps 'libnabo', a Fast K Nearest Neighbour Library for Low Dimensions

  • Versions: 6
  • Dependent Packages: 17
  • Dependent Repositories: 51
  • Downloads: 7,317 Last month
  • Docker Downloads: 134,931
Rankings
Dependent repos count: 3.5%
Dependent packages count: 3.8%
Downloads: 5.9%
Stargazers count: 11.5%
Average: 12.1%
Docker downloads count: 20.2%
Forks count: 27.8%
Maintainers (1)
Last synced: 12 months ago
conda-forge.org: r-nabor
  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.3%
Dependent packages count: 29.0%
Average: 42.0%
Stargazers count: 48.6%
Forks count: 66.0%
Last synced: 12 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.2 depends
  • Rcpp >= 0.11.2 imports
  • methods * imports
  • RANN * suggests
  • testthat * suggests