Back to Article
Simulation - Sparsity in High Dimensions
Download Notebook

Simulation - Sparsity in High Dimensions

Use Monte Carlo experiments to show that, for a fixed number of samples \(m\), data become effectively “sparser” as the input dimension \(n\) grows.

For each \(n \in \{1,2,5,10,20,50,100\}\), draw \(n\) i.i.d. points \(x_1,\dots,x_m \sim \mathrm{Unif}([0,1]^n)\).

Compute the nearest-neighbor (NN) distance for each point and report the mean NN distance as a function of \(n\). Plot it as a function of \(n\).