cutHyperSphere {intrinsicDimension} | R Documentation |
Piece of Noisy Hypersphere
Description
Generates Ns
data points cut out from a noisy hypersphere. n
has to be at least d+1
, otherwise the function terminates with an
error.
Usage
cutHyperSphere(Ns, rat, d, n, sd)
Arguments
Ns |
number of data points. |
rat |
ratio between cut-off radius and radius of sphere. |
d |
(intrinsic) dimension of hypersphere. |
n |
dimension of noise. |
sd |
standard deviation of noise. |
Details
The returned data are within distance rat
the point
1/\sqrt{d+1}(1 ... 1)
and are obtained from a unit distribution on the
d
-sphere overlaid with n
-dimensional normal noise.
The data generated by this function can be used to evaluate the performance of local dimension estimators.
Value
A Ns
by n
matrix.
Warning
If sd
is high, cutHyperSphere
will be slow and might not even
be able to return a data set. If so, it will return NULL
.
Author(s)
Kerstin Johnsson, Lund University
See Also
Examples
datap <- cutHyperSphere(100, rat = .5, 1, 3, 0.01)
par(mfrow = c(1, 2))
plot(datap[, 1], datap[, 2])
plot(datap[, 1], datap[, 3])
datap <- cutHyperSphere(100, rat = 2, 1, 3, 0.11)
par(mfrow = c(1, 2))
plot(datap[, 1], datap[, 2])
plot(datap[, 1], datap[, 3])