Liking cljdoc? Tell your friends :D

umap

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.

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.
raw docstring

->epochs-per-neg!_m_doubles_doubles_long_double_Implclj

(->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.
sourceraw docstring

->make-epochs-per-sample!_m_doubles_doubles_long_Implclj

(->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.
sourceraw docstring

Aclj

source

Bclj

source

epochs-per-neg!clj

(epochs-per-neg! arg0 arg1 arg2 arg3)
source

epochs-per-neg!_m_doubles_doubles_long_doubleclj

(epochs-per-neg!_m_doubles_doubles_long_double & args__69961)
source

epochs-per-neg!_m_doubles_doubles_long_double-implclj

source

fitclj

(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.
sourceraw docstring

make-epochs-per-sample!clj

(make-epochs-per-sample! arg0 arg1 arg2)
source

make-epochs-per-sample!_m_doubles_doubles_longclj

(make-epochs-per-sample!_m_doubles_doubles_long & args__69909)
source

make-epochs-per-sample!_m_doubles_doubles_long-implclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close