{"id":51650705,"url":"https://github.com/replikativ/umap-rstr","last_synced_at":"2026-07-14T03:32:42.867Z","repository":{"id":369429865,"uuid":"1272791678","full_name":"replikativ/umap-rstr","owner":"replikativ","description":"UMAP (Uniform Manifold Approximation and Projection) for Clojure — a port of umap-learn on the raster typed-dispatch compiler.","archived":false,"fork":false,"pushed_at":"2026-07-05T08:50:36.000Z","size":1312,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T10:13:29.714Z","etag":null,"topics":["clojure","data-science","raster","umap","visualization"],"latest_commit_sha":null,"homepage":"https://simm.is","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replikativ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T00:04:43.000Z","updated_at":"2026-07-05T08:50:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/replikativ/umap-rstr","commit_stats":null,"previous_names":["replikativ/umap-rstr"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/replikativ/umap-rstr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replikativ%2Fumap-rstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replikativ%2Fumap-rstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replikativ%2Fumap-rstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replikativ%2Fumap-rstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replikativ","download_url":"https://codeload.github.com/replikativ/umap-rstr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replikativ%2Fumap-rstr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35445235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","data-science","raster","umap","visualization"],"created_at":"2026-07-14T03:32:42.330Z","updated_at":"2026-07-14T03:32:42.858Z","avatar_url":"https://github.com/replikativ.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# umap-rstr\n\n[![Clojars Project](https://img.shields.io/clojars/v/org.replikativ/umap-rstr.svg)](https://clojars.org/org.replikativ/umap-rstr)\n[![CircleCI](https://circleci.com/gh/replikativ/umap-rstr.svg?style=shield)](https://circleci.com/gh/replikativ/umap-rstr)\n[![Slack](https://img.shields.io/badge/slack-join_chat-brightgreen.svg)](https://clojurians.slack.com/archives/C09622F337D)\n\nUMAP (Uniform Manifold Approximation and Projection) for Clojure, built on\n[raster](https://github.com/replikativ/raster) — typed multiple dispatch with\ndevirtualizing bytecode compilation. The `-rstr` suffix in the repo/artifact name\n(`umap-rstr`) marks the raster substrate, à la Julia's `.jl` repo suffix; the\nnamespace you require is just `umap`.\n\nA faithful port of `umap-learn` (Python+numba is the gold standard): cosine/\neuclidean kNN → fuzzy simplicial set → spectral/random init → negative-sampled\nSGD layout. The numeric kernels are `deftm` functions that JIT-compile to\nprimitive-speed JVM bytecode; the orchestration is plain Clojure.\n\n## Status\n\nValidated against `umap-learn` on MNIST-70k and Fashion-MNIST-70k (cosine):\n\n| dataset | trust (rstr) | trust (umap-learn) | fit (rstr) | fit (umap-learn) |\n|---------|--------------|--------------------|------------|------------------|\n| MNIST-70k   | 0.951 | 0.950 | 83 s  | 109 s |\n| Fashion-70k | 0.901 | 0.906 | 67 s  | 181 s |\n\nTrustworthiness matches; wall-clock is faster (incl. cold JVM/JIT). See\n`dev/` for the reproducible comparison harness.\n\nEmbeddings side-by-side (left: umap-rstr, right: umap-learn), coloured by the\ntrue class label:\n\n![MNIST: umap-rstr vs umap-learn](img/mnist_compare.png)\n\n![Fashion-MNIST: umap-rstr vs umap-learn](img/fashion_compare.png)\n\n## Installation\n\nraster depends on a typedclojure fork via git, and git deps resolve transitively\nonly through `deps.edn` (not a Maven POM), so pin this lib as a git dependency:\n\n```clojure\nio.github.replikativ/umap-rstr\n{:git/url \"https://github.com/replikativ/umap-rstr\"\n :git/sha \"\u003csha\u003e\"}\n```\n\n(Once typedclojure ships its fixes in a Maven release upstream, this moves to a\n`org.replikativ/umap-rstr {:mvn/version \"...\"}` Clojars coordinate.)\n\n## Usage\n\n```clojure\n(require '[umap :as umap])\n\n;; X: flat row-major double[] (or float[]) of n*dim\n(def result (umap/fit X n dim :k 15 :metric :cosine :init :auto :seed 42))\n(:emb result)   ;; =\u003e double[n*2] embedding\n```\n\nOptions: `:k` (neighbors, 15), `:out-dim` (2), `:n-epochs` (auto 500/200),\n`:neg-rate` (5.0), `:gamma` (1.0), `:init` (`:auto`/`:spectral`/`:random`),\n`:metric` (`:cosine`/`:euclidean`), `:seed` (42).\n\n## Namespaces\n\n- `umap` — public `fit` orchestrator\n- `umap.layout` — negative-sampled SGD (the hot kernel)\n- `umap.graph` — fuzzy simplicial set (smooth-knn-dist, membership, symmetrize)\n- `umap.spectral` — spectral init (matrix-free Lanczos, disconnected-graph handling)\n\nkNN / RP-trees / Tausworthe RNG live in raster (`raster.knn`,\n`raster.spatial.*`, `raster.tausworthe`) since they're shared with clustering.\n\n## Requirements\n\nRuns on the Valhalla JDK (raster's `deftm` kernels use preview features). See\nraster's README for JDK setup and run with the `:valhalla` alias.\n\n```bash\nclojure -M:valhalla:test          # run tests\n```\n\n## License\n\nBSD 3-Clause (see `LICENSE` and `NOTICE`).\n\numap-rstr is a derivative work — a Clojure / raster port of\n[umap-learn](https://github.com/lmcinnes/umap) (© 2017 Leland McInnes, BSD\n3-Clause). It follows umap-learn's algorithm and numerical behaviour but is an\nindependent reimplementation, not endorsed by or affiliated with the original\nauthors. The port is © 2026 Christian Weilbach, released under the same license.\n\n\u003e McInnes, L., Healy, J., \u0026 Melville, J. (2018). UMAP: Uniform Manifold\n\u003e Approximation and Projection for Dimension Reduction. arXiv:1802.03426.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplikativ%2Fumap-rstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplikativ%2Fumap-rstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplikativ%2Fumap-rstr/lists"}