Repository navigation
Align the UMAP implementation with the reference pure-MLX UMAP so it produces equivalent embeddings.
Changes
- Spectral initialization (new
src/spectral-init.ts): power iteration on the symmetric-normalized graph adjacency, scaled to[0,10]+ jitter — replaces random uniform init. - smooth-kNN σ search: sums over neighbors
j=1..k-1(skips thej=0/rho column),rho = max(min_nonzero, 1e-8), σ bounded to[1e-20, 1e3]then floored at1e-10. - SGD: squared distances floored at
1e-6; each active edge does exactlynegativeSampleRaterepulsions (flat rate); the CPU path now uses Jacobi accumulation to match the GPU two-pass. - Made the CPU-vs-GPU comparison test deterministic.
Published automatically via the GitHub Actions npm pipeline (OIDC trusted publishing).