asPointwiseEstimator {intrinsicDimension} | R Documentation |
Turn a local estimator into a pointwise estimator
Description
Returns a function that can be used as a pointwise estimator of intrinsic dimension that uses local data sets with a fixed number of data points.
Usage
asPointwiseEstimator(estimator, neighborhood.size, indices=NULL, eps=0.0)
Arguments
estimator |
A local intrinsic dimension estimator. |
neighborhood.size |
The number of neighbors used for each dimension estimate. |
indices |
A vector with indices of the points in |
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 function that can be used as a pointwise dimension estimator.
Author(s)
Kerstin Johnsson, Lund University
Examples
data <- swissRoll3Sph(300, 300)
# the first 300 data points are on the swiss roll (ID=2) , the last 300 on the 3-sphere (ID=3)
essPointwiseDimEst <- asPointwiseEstimator(essLocalDimEst, neighborhood.size=10,
indices = c(1:10, 301:310))
ess.pw.res <- essPointwiseDimEst(data)
ess.pw.res$dim.est
[Package intrinsicDimension version 1.2.0 Index]