Skip to main content

Generalizable UMAP Implementation

Project description

NUMAP

This is the official PyTorch implementation of NUMAP from the paper "Generalizable Spectral Embedding with Applications to UMAP".

Installation

To install the package, simply use the following command:

pip install numap

Usage

The basic functionality is quite intuitive and easy to use, e.g.,

from numap import NUMAP

numap = NUMAP(n_components=2)  # n_components is the number of dimensions in the low-dimensional representation
numap.fit(X)  # X is the dataset and it should be a torch.Tensor
X_reduced = numap.transfrom(X)  # Get the low-dimensional representation of the dataset
Y_reduced = numap.transform(Y)  # Get the low-dimensional representation of a test dataset

You can read the code docs for more information and functionalities.

Running examples

In order to run the model on the 2 Circles dataset, you can either run the file, or using the command-line command:
python tests/run_numap.py
This will run NUMAP and UMAP on the 2 Circles dataset and plot the results.

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

numap-0.2.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

numap-0.2.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file numap-0.2.0.tar.gz.

File metadata

  • Download URL: numap-0.2.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for numap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0ab949199a368dfd92be93d46c8ac488cf0d0f2b01fd74034ada840ef1e1f71b
MD5 62ddb4cedaac954449ca3b5e6aafcb53
BLAKE2b-256 fc80f692a10a044acfd1b9cada76100f42cb52eee1272ca2f2b866466363297a

See more details on using hashes here.

File details

Details for the file numap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: numap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for numap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 070a9185b160068a9e43360ce444c2c5c2f5b4111d330754d9f82aefc259241e
MD5 229a3730b9c7b4ea7497a9f0dca5b338
BLAKE2b-256 74f2aca147a18fbecc72d00f4b622126eb2d298bed8c5ebe821d6501625b040d

See more details on using hashes here.

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