Given a point cloud X
(kde
computes the Kernel Density Estimator over a grid of points. The kernel is a Gaussian Kernel with smoothing parameter h
. For each
kde(X, Grid, h, kertype = "Gaussian", weight = 1,
printProgress = FALSE)
an
an
number: the smoothing paramter of the Gaussian Kernel.
string: if kertype = "Gaussian"
, Gaussian kernel is used, and if kertype = "Epanechnikov"
, Epanechnikov kernel is used. Defaults to "Gaussian"
.
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
.
The function kde
returns a vector of length
Larry Wasserman (2004), "All of statistics: a concise course in statistical inference", Springer.
Brittany T. Fasy, Fabrizio Lecci, Alessandro Rinaldo, Larry Wasserman, Sivaraman Balakrishnan, and Aarti Singh. (2013), "Statistical Inference For Persistent Homology: Confidence Sets for Persistence Diagrams", (arXiv:1303.7117). To appear, Annals of Statistics.
# NOT RUN {
## Generate Data from the unit circle
n <- 300
X <- circleUnif(n)
## Construct a grid of points over which we evaluate the function
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 density estimator
h <- 0.3
KDE <- kde(X, Grid, h)
# }
Run the code above in your browser using DataLab