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.1 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.1.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.1-cp313-cp313-win_amd64.whl (993.5 kB view details)

Uploaded CPython 3.13Windows x86-64

umapers-1.1.1-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.1-cp313-cp313-macosx_11_0_arm64.whl (916.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umapers-1.1.1-cp312-cp312-win_amd64.whl (994.4 kB view details)

Uploaded CPython 3.12Windows x86-64

umapers-1.1.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (916.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umapers-1.1.1-cp311-cp311-win_amd64.whl (994.0 kB view details)

Uploaded CPython 3.11Windows x86-64

umapers-1.1.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (916.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umapers-1.1.1-cp310-cp310-win_amd64.whl (993.9 kB view details)

Uploaded CPython 3.10Windows x86-64

umapers-1.1.1-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.1-cp310-cp310-macosx_11_0_arm64.whl (916.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umapers-1.1.1-cp39-cp39-win_amd64.whl (994.6 kB view details)

Uploaded CPython 3.9Windows x86-64

umapers-1.1.1-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.1-cp39-cp39-macosx_11_0_arm64.whl (916.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: umapers-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ac14432d16b9991ef55b31853a15f9629ee4711d3eb522377c8adf18a85878f7
MD5 dd42b205eacd145312cb63edff13bf3e
BLAKE2b-256 f6e71b02b9aacb322b043444ddcc5f6aa5cef3685bb8776dfe457fb229f56db4

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1.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.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 993.5 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9e549c28d638f2c6e4d99e957a5817649eaa373b345f1d93ce220f440b0481d3
MD5 c4c6d63e165aad5203efa385d44c661b
BLAKE2b-256 c183f810c3864c4070e771cef63b0dfd5b643c3273bb87a22efb35d736b3432c

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e73a973e7cb6486be720dca7d2db28af424c5ed8e1b8e84aa54b81462808231
MD5 07efdabdf94499f30240b1231c9192f7
BLAKE2b-256 7c8e49179bb6ec6bbd22a9caf14014c460a3de9826b2b89129fd6a5884c4cb6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 597f66024521a50b7a75629119948d83413f7dab76cea7d37848c141b4fdc73e
MD5 ac771a41331d810ff08c0ac31842711d
BLAKE2b-256 6e5345d5fca83b0d548d8e688c21ac3cfcb8df4d4aa3484192d29c9aa808b08a

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 994.4 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8fbe73f992a05cb8bd338e639b1134df4ed65e34ade3cb24c350ae2f5a2123a5
MD5 fe5b19be8449807cc45a3aeb83f60f44
BLAKE2b-256 0af4a35aba72ca49b52008e280be944c5053ec378d8e7dd02b74326c50bc97bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2390df15a9d59cb13c36d1bb11c0d64c75e83b06e04d1ef0820b57652d287950
MD5 0c5ffcdb5a53fdee0a818a92b1518a33
BLAKE2b-256 f790aca29e195df65b3f1b71efd40466062b67f332e9eda48c904dfedfa67193

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5abf1ab2bfd96782a18fb9b162006ff3818f378fc2d5eb4f9b5b3ce758c8b24c
MD5 dc6e208026018bc408a000f7206c4dfc
BLAKE2b-256 6882c5d8048036c61ed9fe1f0c89953929d68fbf25ba7ed209041c23e4d0fe65

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 994.0 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a1b2b4f3a4b9053a5a8a86150244e316e3afe21684542618a85c5d93c6bc7e34
MD5 bdbcac921446fdef54cddf709a43cc0c
BLAKE2b-256 0aeb9e7b76aeef082c9e20eb5d8e983ba99ea3df74cc5c38d089e35b448d071a

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5fcbe6920c72ac3ed26370a67f950ecbd39611a447ad369a012d6f14d7400a2
MD5 b5cbfd8c0db2be873566b9569682b9f0
BLAKE2b-256 8c0539630c1090f64c5765b21bd9a0aa82a74088645122e87052d83ca2a540f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca8dce6db24729cd60e0ba6c8a1fcb86c8585a1df3779327b874b2f2f42a09ab
MD5 9c0d854e7d06c44ddce565970916fcbb
BLAKE2b-256 3a9582386d915da9d3dc45fa09042c63595656596e23ed75107942176bc43e83

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 993.9 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bd54dbb62871c641759bfc83aa869095ea38e8d2d319a6e106cc9d14dca8338e
MD5 9cf8927bdb1e32d1797fcbd614c02229
BLAKE2b-256 40f323d7555d93dc624dbbc6aafebba85ec1f7e094b0b4ab0917cb01a2c459f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 81f13d82c3c38cac268d125a837af9b26cc6a7f91ee421442c0c430cbbb419e5
MD5 3fc3c46a647b5c5ea2a99d2b52ff9f18
BLAKE2b-256 5caa7a3c63d2b34c1d5dfa7b9e72d480a59e5a1e594c057ddd34e616d03e3f67

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db887a23d1c7cdf7cfa851226da30098f0081997cf5d8582a6fa628355092931
MD5 ba7d9b770fc281a5fb4d022d3bf135c1
BLAKE2b-256 0d5399812e54e3822c4db95dab9229f37e8edd05ddb399f9e0ff570a6d4b242b

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 994.6 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4eb5727602f675e7533be06f98d3fefe8a5e150fa0e2a91518b1ac7765194e82
MD5 9213a9a3c778006d5f801fd99f6caf53
BLAKE2b-256 b87a9c5f4999aa647afaf7a05c03865075469266fd678af4f5b06bd99fd0afa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5528520c6e5fb4fe4523fb2c8cee222275eab4264a1f2d9389eb9af8d4ccef7
MD5 3dadfee4aabd1f5dbf4de3180fdf642a
BLAKE2b-256 9b452d153555a919460334cba2f048ed4042ab29defe8d6257a01e027b5ceec4

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 952845724ea1a48c515b94dacaafc23de7d26afca6c0e39b09a83075cddffa2f
MD5 62aa739933c7f34fb1e935585d6e3b68
BLAKE2b-256 3daf885d70dcee9a9261137236f36cdd7cc2a39f28ac9fe20737fe44a4cae22e

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.1-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