inst/doc/nearest-neighbor-descent.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(rnndescent)

## ----NND----------------------------------------------------------------------
iris_knn <- nnd_knn(iris, k = 15)

## ----indices------------------------------------------------------------------
iris_knn$idx[1:2, 1:5]

## ----distances----------------------------------------------------------------
iris_knn$dist[1:2, 1:5]

Try the rnndescent package in your browser

Any scripts or data that you put into this service are public.

rnndescent documentation built on May 29, 2024, 8:38 a.m.