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 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.3.tar.gz (150.5 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.3-cp313-cp313-win_amd64.whl (998.6 kB view details)

Uploaded CPython 3.13Windows x86-64

umapers-1.1.3-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.3-cp313-cp313-macosx_11_0_arm64.whl (916.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umapers-1.1.3-cp312-cp312-win_amd64.whl (999.2 kB view details)

Uploaded CPython 3.12Windows x86-64

umapers-1.1.3-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.3-cp312-cp312-macosx_11_0_arm64.whl (917.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umapers-1.1.3-cp311-cp311-win_amd64.whl (998.2 kB view details)

Uploaded CPython 3.11Windows x86-64

umapers-1.1.3-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.3-cp311-cp311-macosx_11_0_arm64.whl (916.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umapers-1.1.3-cp310-cp310-win_amd64.whl (998.3 kB view details)

Uploaded CPython 3.10Windows x86-64

umapers-1.1.3-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.3-cp310-cp310-macosx_11_0_arm64.whl (916.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umapers-1.1.3-cp39-cp39-win_amd64.whl (998.9 kB view details)

Uploaded CPython 3.9Windows x86-64

umapers-1.1.3-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.3-cp39-cp39-macosx_11_0_arm64.whl (917.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: umapers-1.1.3.tar.gz
  • Upload date:
  • Size: 150.5 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.3.tar.gz
Algorithm Hash digest
SHA256 142c1f9c24495d3a5730c500c824b63b2e9df1e0e30154cf945a7c8a7be37fcf
MD5 e1df815de91787ae46e73276586a1adf
BLAKE2b-256 1356a99523cd834bac06f4de60ab6fbad3f4655bd33cbfe75ba529751da3b830

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 998.6 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ff222d05b6de36372834ae34f895366b114e338448e1a4f9720707410cf73ab1
MD5 a8955455a63999c7b34858267cf5d910
BLAKE2b-256 682cd432eed0850ad9fd7670080e659185f54901486b7d20b5b15b30ab2ed039

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 752917ecc5a578306d396ed024193366795c6e7465977519b2303ff1dbe81b59
MD5 e841c6afb3d08577074085d170938f77
BLAKE2b-256 216eb83ca49ad7bb2c0bab1a8a945da6eb5abf3db6333c61040ff9dec734fbad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 196c5b5a19705d5235363ea84be3dcf5db77e66d28f141257a6d72ca41152740
MD5 baa12f8eb72807a4d6056575a4e29f8e
BLAKE2b-256 2a30e68850a3e22fc4cac0992bda6da11165286304ea05371406d7e4636c4c78

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 999.2 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4bbab808acba6e1a3b754d8eb6d23901e0b67ff50cd1dc8b3bfc7616bc2f2e10
MD5 007fb81f42368a1c215107dfff7abd5c
BLAKE2b-256 8a2d673bf8da3c3f8a707c049668c1ddbd3cf944786a0a58e37c89ee86276faa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f39c56ed1e7732a3228161d18370cf72b5ccce3d2f91dcf35d87fbfff540e550
MD5 46e6afe5fb2678b7fcc5225fc086f00f
BLAKE2b-256 db95a1dbce49a5c08a5751a4b009be01b1aef1468c1d3f2d9171dfc373643eab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a34015ba79cd7fa7df076c42d63b8fa536f991c8110a1e0154d2f06b69ffe69f
MD5 44f538d5127292407bef412971ccbbf4
BLAKE2b-256 3201a0280803eca6e1d7b6921dafd116c80fd293ebf5824af7dfd57c89ff6613

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 998.2 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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1759bc9bbad0191d39324a99656b96d9cb42eeefb46322689d567e319a1e54d5
MD5 ae5fb80db70577667a33d8d6f60bbd96
BLAKE2b-256 b52f91f66983e153dd71efa90384d00af92d5b2ba1023a2023b5379be02ac8d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7f2c9f6f7df9eefacce4d189bf684cac13ada831ba4779e4b0adabaa43a8b01
MD5 266fc46d0a0e58fbb89b05d585f19fb7
BLAKE2b-256 8a922cea22f2d96adcce1dafe01718176bb89ceb1fa29bb12d27403fd85a6b4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ff4ecce0ad6812156d119cb0365c399124dd2168e8ee0300d68607c105eb3d5
MD5 67fc78dd793058d7205a9a77771c808a
BLAKE2b-256 e0b23f2261fc62e22f313227e691310a5c2ef10d1ccf8ca30a8bcc68b509519c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 998.3 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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 44566ea2c3595df604d3340680dc818a9c8e70c0714581ffb08096809bd84025
MD5 696e6a2f4bfa500bfcd2e890b5c87f8b
BLAKE2b-256 dc18b74a15ab0913b1f4349f8cad3f1a68fc4de439507ac54025376fa8ad1a46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2239786ed2bc108d8312169e2e156149ba2293549c2b28f1a2942b985b5a88d4
MD5 a288f47257521a48ae81bb5ad39063b5
BLAKE2b-256 3d45692b721e8598b95357dffc0ec51a5be319480080243daaccdd2ad2e42384

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72208596edb9e9fb3cb31dea5923589ea5cd31941fbe439840b745e86db1701e
MD5 346ca025800fe8a8bddb25241cde48ee
BLAKE2b-256 c7bebdd2e4fa640c822335ad0cfe3495f9aa8a91633437772e4acc9b06e57e53

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 998.9 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d532b8cefa7fd5782fb1c5e0d5ffbf50cfd3b6c71caedd131a8c091796dd9c98
MD5 51cf3a8eb2a3d390f1236bc5a8e4e0a6
BLAKE2b-256 c187970851617cd1ed928a64f0895d395ff74dcca8ab24518c2345e3927ecd84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7252f72335675ae8665395cc1ee477c84e8271e34a7c9c1f4428f8b4fe00d55
MD5 23a66468c8182b58249aed38e3737c27
BLAKE2b-256 7705046ac8ddfb2cc7ef95deb77b0ae36137a09d3f4e254cddba2958763f1bcb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab541b4c38be34f10794654d828c6c749e4c13f899514c6fc69d0698734f4ed6
MD5 3bf87a761d4efa77df2b0e12281393ec
BLAKE2b-256 416568588bc8bece5814541cc57e13c4f609354d2e76699bb1b7eb96191a3fc2

See more details on using hashes here.

Provenance

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