Description Usage Arguments Value
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.
1 2 | knn.from.data(dT, k, metric.function, subsample.k = 0.5,
fix.observations = NULL)
|
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.