Skip to main content

Curvature-based stochastic neighbor embeddings for cluster-preserving visualization

Project description

Official Implementation of the paper: "EmbedOR: Provable Cluster-Preserving Visualizations with Curvature-Based Stochastic Neighbor Embeddings"

Getting Started

Installation

Create and activate a virtual environment:

python3 -m venv env
source env/bin/activate

Upgrade pip and install the published package from PyPI:

pip install --upgrade pip
pip install embedor

requirements.txt tracks the third-party packages imported from src/, including the optional biological-data and visualization helpers in src/data/data.py and src/vis.py.

Quick Start

The repository currently exposes a Python API rather than a checked-in CLI script. A minimal end-to-end example is:

from src.data.data import moons
from src.embedor import EmbedOR
from src.plotting import plot_data_2D

dataset = moons(n_points=1000, noise=0.05)
X = dataset["data"]
labels = dataset["cluster"]

embedding = EmbedOR(
	nng_params={"mode": "nbrs", "n_neighbors": 15},
	edge_weight="orc",
	layout="torch",
	seed=42,
).fit_transform(X)

plot_data_2D(embedding, color=labels, title="EmbedOR embedding")

Project Layout

  • src/embedor.py contains the main EmbedOR estimator.
  • src/data/data.py contains synthetic data generators and dataset loaders.
  • src/plotting.py contains lightweight plotting helpers for embeddings and graphs.
  • src/vis.py contains additional visualization and RNA-velocity utilities.
  • src/utils/ contains graph construction, curvature, layout, and timing helpers.

If you want a scriptable workflow, add a small runner that imports EmbedOR from src.embedor and passes either a NumPy array or a precomputed adjacency matrix into fit/fit_transform.

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

embedor-0.1.1.tar.gz (57.4 kB view details)

Uploaded Source

Built Distribution

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

embedor-0.1.1-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

Details for the file embedor-0.1.1.tar.gz.

File metadata

  • Download URL: embedor-0.1.1.tar.gz
  • Upload date:
  • Size: 57.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for embedor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8778cfb7ca332bdd7a2452cf03c353e4f10c32b41e82abb973590742a2b28b98
MD5 3cd5972a9ff5bd5387d501abc44021f9
BLAKE2b-256 6c6d3c623030a9ab17fb54374776511777353ab023d42d87c85f9c6e64235530

See more details on using hashes here.

File details

Details for the file embedor-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: embedor-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for embedor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9f8ffe3e280b9459ac38e3537104a22af79eccde7375fe5991472fb9a91a2e
MD5 c51887003b7e53a6083f547abdfe22c8
BLAKE2b-256 74699780121664fc61ae98469dfce1bf6d5889eee1bb53af7de1453d5a0eef9c

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