Learn R Programming

intrinsicDimension (version 1.2.0)

knnDimEst: Dimension Estimation from kNN Distances

Description

Estimates the intrinsic dimension of a data set using weighted average kNN distances.

Usage

knnDimEst(data, k, ps, M, gamma = 2)

Arguments

data

data set with each row describing a data point.

k

number of distances to neighbors used at a time.

ps

vector with sample sizes; each sample size has to be larger than k and smaller than nrow(data).

M

number of bootstrap samples for each sample size.

gamma

weighting constant.

Value

A DimEst object with slots:

dim.est

the intrinsic dimension estimate (integer).

residual

the residual, see Carter et al. (2010).

Details

This is a somewhat simplified version of the kNN dimension estimation method described by Carter et al. (2010), the difference being that block bootstrapping is not used.

References

Carter, K.M., Raich, R. and Hero, A.O. (2010) On local intrinsic dimension estimation and its applications. IEEE Trans. on Sig. Proc., 58(2), 650-663.

Examples

Run this code
# NOT RUN {
N <- 50
data <- hyperBall(N, 5)

k <- 2
ps <- seq(max(k + 1, round(N/2)), N - 1, by = 3)
knnDimEst(data, k, ps, M = 10, gamma = 2)

# }

Run the code above in your browser using DataLab