Skip to main content

Python bindings for rust_umap

Project description

umapers

umapers is a Python UMAP library for dimensionality reduction, clustering workflows, and embedding visualization.

umap-learn is the established Python implementation used as the compatibility and benchmark baseline for this project. For matching parameters and workflows, umapers keeps the user-visible semantics familiar while running its own fitting and transform code instead of importing umap-learn at runtime.

The public API is intentionally small: fit an embedding, transform new rows, check quality, and reproduce runs with fixed seeds.

Installation

pip install umapers

Optional extras for plotting and diagnostics:

pip install "umapers[plot,diagnostics]"

Quickstart

import numpy as np
from umapers import Umap

x = np.random.default_rng(42).normal(size=(1000, 32)).astype(np.float32)

embedding = Umap(
    n_neighbors=15,
    n_components=2,
    n_epochs=200,
    random_seed=42,
).fit_transform(x)

Fit once and transform new rows:

model = Umap(random_seed=42).fit(x)
query_embedding = model.transform(x[:10])

Use labels to run categorical supervised UMAP:

labels = np.random.default_rng(7).integers(0, 4, size=x.shape[0])

embedding = Umap(
    target_metric="categorical",
    target_weight=0.5,
    random_seed=42,
).fit_transform(x, y=labels)

Results

The 1.1.0 release reports compare umapers with umap-learn on feature coverage, clustering quality, and runtime. On the real datasets tested here, downstream clustering quality is similar. On the synthetic scaling benchmarks, umapers is strongest on medium and large matrices; for very small datasets, fixed overhead can make umap-learn faster.

Supported Workflows

Need API
Fit a 2D or nD embedding Umap(...).fit_transform(data)
Fit once, then transform new rows model.fit(data) then model.transform(query)
Approximate inverse mapping model.inverse_transform(embedding)
Categorical supervised embedding target_metric="categorical", pass y=
Dense densMAP radii densmap=True, output_dens=True
Sparse input pass CSR/CSC/COO input to fit or fit_transform
Plot an embedding umapers.plot.points(...)
Compute trustworthiness umapers.diagnostics.trustworthiness_report(...)
Reuse a precomputed kNN graph Umap.fit_transform_with_knn(...)
Parametric convenience workflow ParametricUmap
Aligned convenience workflow AlignedUmap

Known Gaps

  • sparse-trained inverse_transform is not supported yet
  • ParametricUmap is a lightweight convenience workflow, not a Keras/TensorFlow replacement
  • AlignedUmap covers only part of the relation modes available in umap-learn
  • approximate-neighbor behavior is not identical to pynndescent
  • arbitrary precomputed graph input is not exposed as a general public API

Source Build

pip install --upgrade pip maturin
maturin develop --release --manifest-path umap_rs/Cargo.toml
python -I -m pytest -q umap_rs/tests/test_binding.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

umapers-1.1.0.tar.gz (149.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

umapers-1.1.0-cp313-cp313-win_amd64.whl (992.7 kB view details)

Uploaded CPython 3.13Windows x86-64

umapers-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

umapers-1.1.0-cp313-cp313-macosx_11_0_arm64.whl (916.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umapers-1.1.0-cp312-cp312-win_amd64.whl (993.6 kB view details)

Uploaded CPython 3.12Windows x86-64

umapers-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

umapers-1.1.0-cp312-cp312-macosx_11_0_arm64.whl (916.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umapers-1.1.0-cp311-cp311-win_amd64.whl (993.4 kB view details)

Uploaded CPython 3.11Windows x86-64

umapers-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

umapers-1.1.0-cp311-cp311-macosx_11_0_arm64.whl (916.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umapers-1.1.0-cp310-cp310-win_amd64.whl (993.2 kB view details)

Uploaded CPython 3.10Windows x86-64

umapers-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

umapers-1.1.0-cp310-cp310-macosx_11_0_arm64.whl (916.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umapers-1.1.0-cp39-cp39-win_amd64.whl (993.8 kB view details)

Uploaded CPython 3.9Windows x86-64

umapers-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

umapers-1.1.0-cp39-cp39-macosx_11_0_arm64.whl (916.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file umapers-1.1.0.tar.gz.

File metadata

  • Download URL: umapers-1.1.0.tar.gz
  • Upload date:
  • Size: 149.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for umapers-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b84d010ac38498d3b7d4f00f86a4021315118f6878e89fba7e184a8240e35b19
MD5 fc487d0d89be246c69f367a739a5a555
BLAKE2b-256 ff8c7e245309f0fc7f5218453490be38b027cb5d77d02c50f0e18cd71c09a6f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0.tar.gz:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 992.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for umapers-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e289034737bd3d39159d86f750213faa50fbb40eda3ddbd09407c3229199858d
MD5 98a8606588c62ce16d8c8e1ac7a4b4ae
BLAKE2b-256 af38f05a0fd5c8f8d8f93a313e84415fb0ba25f3cf90cdce75c91c4766693a1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp313-cp313-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7c95af93654b0d6b102b47a3aff84169490e75568cb3d7babe4ac7a802a52c16
MD5 ddf518418b853aaf9b0f7257c6bc1e6f
BLAKE2b-256 543ae6232f2af03dab3ec78f69fe4a482774b6562ccca67186d7d51a5ac47d82

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4dd1b2294e0b568fe403709d63d45dbdef6373d5ba2169db8af03be2f41f8543
MD5 b9873abd9ef15310e4edac6970cbe1d4
BLAKE2b-256 4d72fe65fc0a6ff02cb5f16a6f19f04d5adb5241e649dc82b2b4ab6e15c6043d

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 993.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for umapers-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 139ff8642b835a9989d682df94db7b967731c6cc32da6f06d4c95653a27d0f53
MD5 9d8f9e25ea9a69c7be213e53a45768eb
BLAKE2b-256 8589e860ec14f5bc415176735d3558d0e6ab9598d85698e3d6df1598b7e8aac3

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp312-cp312-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f1987bc79a2266dd6488ae5ca07b9deec4d69e3ab2b4c54a321d0d4ac5a2ee50
MD5 9e9809f1ec2d9daab98034f08ed0ad60
BLAKE2b-256 e332b13404e4f31bb8828fdce34d32051a9999cfcf2a8ac000c11099857229c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0a33e9365343294d53f8fed36778d8beb04254ce6d3f635f7d7b507b9aef39f
MD5 83988cd04e91d518a953c70d8c355560
BLAKE2b-256 88477164e8ca38ef150b5e2560f621162c556b752badf0de01fc6187873c7861

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 993.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for umapers-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a7e7de7465f61fef80fb59c7cca30dafada61ee0db3f1d887317605de101a8b1
MD5 d7a01f854d839da8b252a262c3736ba7
BLAKE2b-256 279ac01dd7002b346a981688a2eee175ca51d2affdef408a1c3c4f1117d234b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp311-cp311-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d45d4b2391c824ed65abfdf1bba8d8c8adb53b9ea958338223af0669b6a52ec
MD5 d5a6069c8c7de8fcf6f2d5dc47789705
BLAKE2b-256 50982ca71d578a9d4180de8b3bfd9920a74f28cd5234fd0592e166da4c6a6b47

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e36d52a863e0bfe529a0d3993afae00c09e05f2a44f3e972ded8a36d1076b7b9
MD5 54fbc4b30405608264f681237c5c674a
BLAKE2b-256 6a711680f544fb42d2f9b8ef1518be79699d2fec92717ce072c87904f0256c54

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 993.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for umapers-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 14417f5dbde85294b0ccd66011690b8a0380796c8d6fff34f693689d60e10986
MD5 f86b6f448f6c2ffbf80e0b3853fd7459
BLAKE2b-256 d8a2c0482ea1285d8a3c442ca07294fcef66f0247ba75796f849acad67bd0b96

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp310-cp310-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 36f45cda354a9617aee1ce731cad6fb126f6f77d575c72c7a030fdef8acf53a0
MD5 06bb562ef5f74ad2238f4cefadfdf1c4
BLAKE2b-256 0b80c643a1bb5e0b0bee2b738c45454888b951bc51afc2a5803cc7b9ed61a58f

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8961aa0cda42d930c3313f59fb7c00396fab660adc7b341f2cd6a4a9d33022cc
MD5 30e32b6cfed22f5db5bf3e298b3ebbf9
BLAKE2b-256 60701c84066c876a15dae90c907820867effec7713b4e38209b025787e09ef07

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 993.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for umapers-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cad0fa755037fa43517859c562a8b12c248d79c4ce9a75564a8a8b258862ca4d
MD5 787a4b109ffd315d8b454479aa371023
BLAKE2b-256 a09632f2ad8c71affa33bc27ad42d62554521e8fb81aa5767bfce1efb18cae71

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp39-cp39-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cfc14d876a74e06f4589acec2bc6528bc65d752d873ece27ab048e96e7199e60
MD5 f31a06741d054165bdc48dc2c6e5067b
BLAKE2b-256 84f7d796bf6a6f867a83e20732ccb4718f33339a6e08fa8b57e147b777dcdfa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98e91129a9b5a9614759ccbfbb3f021aa2573b16e16f61d3799c4518c315836c
MD5 272142711efd01d767bc9129a34db4a3
BLAKE2b-256 77451644180b3062c27849f20c48c1bbb8b88bb4f3c1655eae8c822e235e7777

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page