neighborhoods: Obtaining neighborhoods (local data) from a data set

Description Usage Arguments Details Value Author(s) Examples

Description

Get a list of neighborhoods, each containing the k nearest neighbors (not including itself) to a point in the data set.

Usage

1
neighborhoods(data, k, indices, eps=0.0)

Arguments

data

A data set.

k

The number of neighbors in each neighborhood.

indices

A vector with indices of the points in data that should be used as center for neighborhoods.

eps

If non-zero, the relative error in distance allowed when finding nearest neighbors. See Details.

Details

The ann function of the package yaImpute is used for finding the k nearest neighbors. The eps parameter to neighborhoods is used in the ann function.

Value

A list of neighborhoods where each item corresponds to one index in indices and each item contains a data set with k data points.

Author(s)

Kerstin Johnsson, Lund University

Examples

1
2
data <- swissRoll3Sph(300, 300)
neighborhoods(data, 10, 1:10)

intrinsicDimension documentation built on June 7, 2019, 5:02 p.m.