knneighbors: KNNeighbors

Description Usage Arguments Value Author(s)

Description

Computes the k nearest neighbours to every data point.

Usage

1
knneighbors(k, data, defined)

Arguments

k

The number of neighbours to be computed

data

A matrix containing the data points as row vectors

defined

A row vector, containing 1 for every column of the data to be used in the computation. If missing, all columns are used

Value

nn

A matrix with n rows and k kolumns. Each row holds the k neighbours of the corresponding data point in ascending order.

Author(s)

Raphael Paebst


Mthrun/Distances documentation built on Feb. 4, 2020, 8:39 p.m.