For each point, compare its first two neighbours. Their distance ratios reveal a dimension through a simple fitted line.
r₁ and r₂ are the first two neighbour distances; F is the cumulative distribution of their ratio.
Keep only two neighbours.Compute μ = r₂ / r₁ for every valid sample.
Order the ratios.Use their empirical cumulative distribution to form the log–log coordinates.
Fit through the origin.The fitted slope is the dimension estimate. The plotted points show how well that relation holds.
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.