Skip to the interactive lab
← The dimensionality notebook

01 / Neighbour distances

Levina–Bickel MLE

A neighbourhood, a few distances, a dimension.

Preparing the geometry lab…

Behind the estimate

A little geometry. A clearer picture.

Back to the experiment ↑

How it works

Zoom in around one point. The spacing of its neighbours tells us how quickly the local volume fills.

d^=k−1∑j=1k−1logTkTj

Tⱼ is the distance to neighbour j; Tₖ is the neighbourhood radius.

  1. Choose a neighbourhood.Sort the distances from the selected point to its k nearest neighbours.
  2. Measure relative spacing.Compare each inner radius with the outer radius through log(Tₖ / Tⱼ).
  3. Invert and aggregate.Estimate each point locally, then take the arithmetic mean of the valid estimates.

The plot is a view of the data. Distances, angles and covariance are computed in all generated coordinates. Noise, sampling and scale can change an estimate; the underlying noiseless manifold is only a reference.