Learn R Programming

TDA (version 1.3)

dtm: Distance to Measure Function

Description

This function computes the "distance to measure function" on a set of points Grid, using the uniform empirical measure on a set of points X. Given a probability measure $P$, The distance to measure function, for each $y \in R^d$, is defined by $$d_{m_0}(y) =\sqrt{ \frac{1}{m_0}\int_0^{m_0} ( G_y^{-1}(u))^2 du},$$ where $G_y(t) = P( \Vert X-y \Vert \leq t)$ and $0

Given $X={x_1, \dots, x_n}$, the empirical version of the distance to measure is $$\hat d_{m_0}(y) = \sqrt{ \frac{1}{k} \sum_{x_i \in N_k(y)} \Vert x_i-y \Vert^2 },$$ where $k= \lceil m_0 n \rceil$ and $N_k(y)$ is the set containing the $k$ nearest neighbors of $y$ among $x_1, \ldots, x_n$.

Usage

dtm(X, Grid, m0)

Arguments

X
an $n$ by $d$ matrix of coordinates of points used to construct the uniform empirical measure for the distance to measure, where $n$ is the number of points and $d$ is the dimension.
Grid
an $m$ by $d$ matrix of coordinates, where $m$ is the number of points in Grid.
m0
a numeric variable for the smoothing parameter of the distance to measure. Roughly, m0 is the the percentage of points of X that are considered when the distance to measure is computed for each point of Grid.

Value

  • dtm returns a vector of length $m$ (the number of points stored in Grid) containing the value of the distance to measure function evaluated at each point of Grid.

Details

See Definition 3.2 of the reference for a formal definition of the "distance to measure" function.

References

Frederic Chazal, David Cohen-Steiner, and Quentin Merigot. "Geometric inference for probability measures." Foundations of Computational Mathematics 11.6 (2011): 733-751.

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.

See Also

kde, kernelDist, distFct

Examples

Run this code
## 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)

## distance to measure
m0=0.1
DTM=dtm(X, Grid, m0)

Run the code above in your browser using DataLab