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.2.tar.gz (150.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.2-cp313-cp313-win_amd64.whl (994.7 kB view details)

Uploaded CPython 3.13Windows x86-64

umapers-1.1.2-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.2-cp313-cp313-macosx_11_0_arm64.whl (917.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umapers-1.1.2-cp312-cp312-win_amd64.whl (995.6 kB view details)

Uploaded CPython 3.12Windows x86-64

umapers-1.1.2-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.2-cp312-cp312-macosx_11_0_arm64.whl (917.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umapers-1.1.2-cp311-cp311-win_amd64.whl (995.4 kB view details)

Uploaded CPython 3.11Windows x86-64

umapers-1.1.2-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.2-cp311-cp311-macosx_11_0_arm64.whl (917.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umapers-1.1.2-cp310-cp310-win_amd64.whl (995.4 kB view details)

Uploaded CPython 3.10Windows x86-64

umapers-1.1.2-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.2-cp310-cp310-macosx_11_0_arm64.whl (917.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umapers-1.1.2-cp39-cp39-win_amd64.whl (995.9 kB view details)

Uploaded CPython 3.9Windows x86-64

umapers-1.1.2-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.2-cp39-cp39-macosx_11_0_arm64.whl (917.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: umapers-1.1.2.tar.gz
  • Upload date:
  • Size: 150.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.2.tar.gz
Algorithm Hash digest
SHA256 330867ce6d29d5135fc278e7d316558e7669a39ad54246667e804519746e43d1
MD5 05d02285e958306c08819dfe80799ac6
BLAKE2b-256 1aa2295209815e153079264297f594fbf2d5c2083670f0eedb4b68091d136300

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 994.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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5b6fb2dd7c587b4f50f9df126eedb04c48b5355e2cdeffe1711e5d72f245cccc
MD5 5e92d17c58bed3f9931f74993cdb9f32
BLAKE2b-256 e1272f637713d1ec8ff8243d5b332d25cbf80995f650565f492615bfca6fb15b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6b6f0e1dc12729070e59ec85d2f9558f0c78b776424a30e207ab1e7b074151b
MD5 8c95c5b35c9664260cdfb56f28b3adf8
BLAKE2b-256 bf9ab1eb5c8c3394c342ad59f9d2795cfce6230202aa1b1b14076602004e410b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5a63333f923d3799c4e62c9ea2d70b5f61ec17a96d3be778271528ee52d1ac58
MD5 e0bc0acf5d0b1ff8898aaa40449d3012
BLAKE2b-256 16c4450f478dd01420486fb36658e3cccac2ef86c7abb69a3050283c2e30b8af

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 995.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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0b2a5dc8d662d4f5fda72ac6e29d2d5f0831bf99af3cf89a75d538322d3822f0
MD5 f99452453a3587ad76384f74307f6840
BLAKE2b-256 cc6b1e6cb5124bced0dbad080692d4d57278a6363566b3ed52363ce20271bb5f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 654da40ba3d23a5127459177caee0ca1c0863e0a468dd0bfaebb045c1ff5b44e
MD5 69af1d59be3e3e7b74a81ddf20131b9e
BLAKE2b-256 d42f52bb1ee7c09b33b4647c43be7a690b8aae5187ea0f22cda9ff72c4390c2c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5676c4b352a4a4344b9f1d11ceddcfd1286bf644b9af3a33acd02a13e5535cec
MD5 9a056372d2e6b29a2d49234ec992db70
BLAKE2b-256 047c4980cb58c951fde6ce4731e85ece6d2fea56a1d35b0148511bdc560beabd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 995.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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0f70ff2965504882232a071802c5339ef29af9ff523dfa5e986d2c248e78cdb5
MD5 148e6732476ecd4e9cac393862c93f65
BLAKE2b-256 1bbfa542053f8955fbbebbcf605ef639610c454a8d082f80ab279d2c83ead198

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf65f6c1bd1565f3dc5c81b9511c2ef4920fd800d2202f4a4f6a1defb5e3b837
MD5 9766a8fb3a9474829ec15440faa1d436
BLAKE2b-256 3f65f6df4d48cb40a7badc7d6c481eb0e80ec03926559a9b111c29d96d8c3621

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c631d67b53a02db57c48ee54e9ae744d5fd7600cb37e7df0e571703a7956e292
MD5 446105e2b185c9c6001ddc2ba1cc4c09
BLAKE2b-256 2c077fa8edc125f87d38e5b6b5286e30206a7f1915d52f0f5b22a4d1cc7518a7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 995.4 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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 96fca08a1fb2110952594ef146375b03a322d3919b0ec5c1c44703eb27a8b096
MD5 8eeae11ee43680478f6446e753e4f2f0
BLAKE2b-256 7d1c983b8b23c70092fe125336746c4a466bbf9b8885d21113197daa2dedc61e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb932766df9bc01b3e9482ac2f726856ccbc880e743002c27db9b11dc62094a9
MD5 9782432866a1bc4850608f585acca808
BLAKE2b-256 3852e25008f3c783007fe1f6d65277c87c5921bfbc1b6d2e341b05dc3653bae2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b525816ba838ec4ac1ef3cd09ad053680b5986f75bf3b7be9f34045126a283f
MD5 83814e9b93ec7415256888f2a333333e
BLAKE2b-256 1d6535da278c2b1ad6a4f2db51e7ee623de34069a8079c5664b6b61f9a48fe11

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: umapers-1.1.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 995.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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cfff29a30a48b1a29174bee0e3cb04adb85cd04f7820e7ed3d98d8a90b7d82a5
MD5 4f4721ff8cb52dbfc34a87b13ad68f4e
BLAKE2b-256 04c5a0805ae663f2383aa88f490e79e93392d448e392befd18d2b3a1dce5a7c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40ef70d720f240a893ffe4c80f6cb8dc8bad8d5c0c195bea734fd8b191bef8ad
MD5 f1b9a37a9910f98caed5593da057ae55
BLAKE2b-256 1c5083d0daf3efe634612079f55791a9a6ce588c41587158f6650fde34e8aebb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for umapers-1.1.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6d5a3bba95d7b4e1e6834d4158ece67e92be48e050f1c892467dc50c7a552d3
MD5 17a7424cb7586f6a4335ca8cfe99f62e
BLAKE2b-256 b3611a973864e1436764a3bf3dfd0753dc96754e02c1044b5b3d3440e520da46

See more details on using hashes here.

Provenance

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