
Given a point cloud X
, the function kernelDist
computes the kernel distance over a grid of points. The kernel is a Gaussian Kernel with smoothing parameter h:
kernelDist(X, Grid, h, weight = 1, printProgress = FALSE)
The function kernelDist
returns a vector of lenght
an
an
number: the smoothing paramter of the Gaussian Kernel.
either a number, or a vector of length X
. If it is a vector, weight
represents weights of each points of X
. The default value is 1
.
if TRUE
, a progress bar is printed. The default value is FALSE
.
Jisu Kim and Fabrizio Lecci
Phillips JM, Wang B, Zheng Y (2013). "Geometric Inference on Kernel Density Estimates." arXiv:1307.7760.
Chazal F, Fasy BT, Lecci F, Michel B, Rinaldo A, Wasserman L (2014). "Robust Topological Inference: Distance-To-a-Measure and Kernel Distance." Technical Report.
kde
, dtm
, distFct
## Generate Data from the unit circle
n <- 300
X <- circleUnif(n)
## Construct a grid of points over which we evaluate the functions
by <- 0.065
Xseq <- seq(-1.6, 1.6, by = by)
Yseq <- seq(-1.7, 1.7, by = by)
Grid <- expand.grid(Xseq, Yseq)
## kernel distance estimator
h <- 0.3
Kdist <- kernelDist(X, Grid, h)
Run the code above in your browser using DataLab