End-to-end UMAP: kNN -> fuzzy simplicial set -> low-dim init -> SGD layout.
A thin orchestrator (plain defn) over the deftm kernels in umap.{layout,graph,spectral}, raster.knn and raster.spatial.nndescent. Python+numba UMAP (umap.umap_.UMAP / simplicial_set_embedding) is the gold standard.
Pipeline (mirrors umap.umap_):
The numeric kernels stay deftm/compile-aot; only the wiring is plain Clojure.
End-to-end UMAP: kNN -> fuzzy simplicial set -> low-dim init -> SGD layout.
A thin orchestrator (plain defn) over the deftm kernels in
umap.{layout,graph,spectral}, raster.knn and raster.spatial.nndescent. Python+numba
UMAP (umap.umap_.UMAP / simplicial_set_embedding) is the gold standard.
Pipeline (mirrors umap.umap_):
1. cosine kNN — exact brute (small n) or NN-descent (large n)
2. smooth-knn-dist! + membership-strengths! -> fuzzy simplicial set
3. symmetrize (t-conorm A+Aᵀ-A∘Aᵀ) -> directed edge list
4. init — spectral (small n) or random uniform[-10,10] (large n)
5. make-epochs-per-sample + optimize-layout! (per-edge attractive +
negative-sampled SGD, Tausworthe RNG)
The numeric kernels stay deftm/compile-aot; only the wiring is plain Clojure.(->epochs-per-neg!_m_doubles_doubles_long_double_Impl)Positional factory function for class umap.epochs-per-neg!_m_doubles_doubles_long_double_Impl.
Positional factory function for class umap.epochs-per-neg!_m_doubles_doubles_long_double_Impl.
(->make-epochs-per-sample!_m_doubles_doubles_long_Impl)Positional factory function for class umap.make-epochs-per-sample!_m_doubles_doubles_long_Impl.
Positional factory function for class umap.make-epochs-per-sample!_m_doubles_doubles_long_Impl.
(epochs-per-neg!_m_doubles_doubles_long_double & args__69961)(fit
X
n
dim
&
{:keys [k out-dim n-epochs neg-rate gamma init seed metric]
:or
{k 15 out-dim 2 neg-rate 5.0 gamma 1.0 init :auto seed 42 metric :cosine}})Fit a UMAP embedding of X (flat row-major double[n*dim]). Options: :k (neighbors, 15) :out-dim (2) :n-epochs (auto 500/200) :neg-rate (5.0) :gamma (1.0) :init (:auto|:spectral|:random) :seed (42). Returns {:emb double[n*out-dim] :n n :dim out-dim :n-edges ...}.
The deftm kernels run via lazy-JIT (fully devirtualized). For repeated/large workloads, compile-aot any kernel externally — no need to bake it in here.
Fit a UMAP embedding of X (flat row-major double[n*dim]).
Options: :k (neighbors, 15) :out-dim (2) :n-epochs (auto 500/200)
:neg-rate (5.0) :gamma (1.0) :init (:auto|:spectral|:random) :seed (42).
Returns {:emb double[n*out-dim] :n n :dim out-dim :n-edges ...}.
The deftm kernels run via lazy-JIT (fully devirtualized). For repeated/large
workloads, compile-aot any kernel externally — no need to bake it in here.(make-epochs-per-sample!_m_doubles_doubles_long & args__69909)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 |