Learn R Programming

Rdimtools (version 1.1.2)

est.nearneighbor2: Near-Neighbor Information with Bias Correction

Description

Though similar to est.nearneighbor1, authors of the reference argued that there exists innate bias in the method and proposed a non-iterative algorithm to reflect local distance information under a range of neighborhood sizes.

Usage

est.nearneighbor2(X, kmin = 2, kmax = max(3, round(ncol(X)/2)))

Value

a named list containing containing

estdim

estimated intrinsic dimension.

Arguments

X

an \((n\times p)\) matrix or data frame whose rows are observations.

kmin

minimum neighborhood size, larger than 1.

kmax

maximum neighborhood size, smaller than \(p\).

Author

Kisung You

References

verveer_evaluation_1995Rdimtools

Examples

Run this code
# \donttest{
## create an example data with intrinsic dimension 2
X = cbind(aux.gensamples(dname="swiss"),aux.gensamples(dname="swiss"))

## acquire an estimate for intrinsic dimension
output = est.nearneighbor2(X)
sprintf("* est.nearneighbor2 : estimated dimension is %.2f.",output$estdim)
# }

Run the code above in your browser using DataLab