locan.analysis.nearest_neighbor#

Nearest-neighbor distance distribution analysis

Nearest-neighbor distance distributions provide information about deviations from a spatial homogeneous Poisson process (i.e. complete spatial randomness, CSR). Point-event distances are given by the distance between a random point (not being an event) and the nearest event. The point-event distance distribution is estimated from a number of random sample points and plotted in comparison to the analytical function for equal localization density.

For a homogeneous 2D Poisson process with intensity \(\rho\) (expected number of points per unit area) the distance from a randomly chosen event to the nearest other event (nearest-neighbor distance) is distributed according to the following probability density (pdf) or cumulative density function (cdf) [1]:

\[ \begin{align}\begin{aligned}pdf(w) &= 2 \rho \pi w \ exp(- \rho \pi w^2)\\cdf(w) &= 1 - exp (- \rho \pi w^2)\end{aligned}\end{align} \]

The same distribution holds for point-event distances if events are distributed as a homogeneous Poisson process with intensity \(\rho\).

References

Classes

NNDistances_csr_2d([momtype, a, b, xtol, ...])

Continuous distribution function for nearest-neighbor distances of points distributed in 2D under complete spatial randomness.

NNDistances_csr_3d([momtype, a, b, xtol, ...])

Continuous distribution function for nearest-neighbor distances of points distributed in 3D under complete spatial randomness.

NearestNeighborDistances([meta, k])

Compute the k-nearest-neighbor distances within data or between data and other_data.

Functions

pdf_nnDistances_csr_2D(x, density)

Probability density function for nearest-neighbor distances of points distributed in 2D with complete spatial randomness.

pdf_nnDistances_csr_3D(x, density)

Probability density function for nearest-neighbor distances of points distributed in 3D with complete spatial randomness.