UMAP embedding layout optimization — a faithful port of umap.layouts.optimize_layout_euclidean (Python+numba is the gold standard).
This is the SGD inner loop shared by UMAP and EVoC node-embedding: per-edge
attractive forces + negative-sampled repulsive forces, with a Tausworthe RNG
for the negative samples. The whole multi-epoch solve compiles to a single
JVM method via compile-aot.
Validation strategy (UMAP SGD is chaotically sensitive, so exact coordinate matching is not meaningful):
tau-rand-int! reproduces umap.utils.tau_rand_int bit-for-bit
(JVM long == numba int64),Arithmetic goes through raster.numeric / raster.arrays so the walker sees it.
UMAP embedding layout optimization — a faithful port of
umap.layouts.optimize_layout_euclidean (Python+numba is the gold standard).
This is the SGD inner loop shared by UMAP and EVoC node-embedding: per-edge
attractive forces + negative-sampled repulsive forces, with a Tausworthe RNG
for the negative samples. The whole multi-epoch solve compiles to a single
JVM method via `compile-aot`.
Validation strategy (UMAP SGD is chaotically sensitive, so exact coordinate
matching is not meaningful):
1. deterministic gate — single attractive-only epoch matches the float64
reference to ~1e-12,
2. RNG gate — `tau-rand-int!` reproduces umap.utils.tau_rand_int bit-for-bit
(JVM long == numba int64),
3. quality gate — full-run trustworthiness(X) matches Python UMAP (~0.956).
Arithmetic goes through raster.numeric / raster.arrays so the walker sees it.(->optimize-layout-chunk!_m_doubles_ints_ints_doubles_doubles_doubles_doubles_longs_double_double_double_double_long_long_double_long_long_Impl)Positional factory function for class umap.layout.optimize-layout-chunk!_m_doubles_ints_ints_doubles_doubles_doubles_doubles_longs_double_double_double_double_long_long_double_long_long_Impl.
Positional factory function for class umap.layout.optimize-layout-chunk!_m_doubles_ints_ints_doubles_doubles_doubles_doubles_longs_double_double_double_double_long_long_double_long_long_Impl.
(->uclip_m_double_Impl)Positional factory function for class umap.layout.uclip_m_double_Impl.
Positional factory function for class umap.layout.uclip_m_double_Impl.
(optimize-layout! emb
head
tail
eps
epn
eons
eonsn
states
a
b
gamma
init-alpha
n-vertices
dim
n-epochs)Run the layout SGD. Epochs are sequential (alpha decays); each epoch's edge loop is dispatched through raster.par.runtime/parallel-for! across par-threads threads (1 = serial/deterministic — the path the quality tests use). Mirrors numba's prange: racy in-place embedding updates + per-vertex RNG, no locks; SGD tolerates the rare lost update. emb is mutated and returned.
Run the layout SGD. Epochs are sequential (alpha decays); each epoch's edge loop is dispatched through raster.par.runtime/parallel-for! across *par-threads* threads (1 = serial/deterministic — the path the quality tests use). Mirrors numba's prange: racy in-place embedding updates + per-vertex RNG, no locks; SGD tolerates the rare lost update. emb is mutated and returned.
(optimize-layout-chunk! arg0
arg1
arg2
arg3
arg4
arg5
arg6
arg7
arg8
arg9
arg10
arg11
arg12
arg13
arg14
arg15
arg16)(optimize-layout-chunk!_m_doubles_ints_ints_doubles_doubles_doubles_doubles_longs_double_double_double_double_long_long_double_long_long
&
args__60044)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |