knn.from.data: get information about approximate k nearest neighbors from a...

Description Usage Arguments Value

View source: R/knn.R

Description

This implementation uses a randomization scheme and thus produces results that are nondeterministic and only approximately correct. The algorithm is roughly inspired by Dong et al, but there are differences. This is a rough implementation and improvements are possible.

Usage

1
2
knn.from.data(dT, k, metric.function, subsample.k = 0.5,
  fix.observations = NULL)

Arguments

dT

matrix with data (observations in columns, features in rows)

k

integer, number of neighbors

metric.function

function that returns a metric distance

subsample.k

numeric, used for internal tuning of implementation

fix.observations

integer, number of observations in dT that will appear in knn

Value

list with two components; indexes - identifies, for each point in dataset, the set of k neighbors distances - provides distances from each point to those neighbors num.computed - for diagnostics only, gives the number of distances computed internally avg.


donelsonsmith/umap_R documentation built on Nov. 4, 2019, 10:58 a.m.