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
Clone the repository:
git clone https://github.com/kathyzxu/embedOR.git
cd embedOR
Create and activate a virtual environment:
python3 -m venv env
source env/bin/activate
Upgrade pip and install the package in editable mode:
pip install --upgrade pip
pip install -e .
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.pycontains the mainEmbedORestimator.src/data/data.pycontains synthetic data generators and dataset loaders.src/plotting.pycontains lightweight plotting helpers for embeddings and graphs.src/vis.pycontains 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file embedor-0.1.0.tar.gz.
File metadata
- Download URL: embedor-0.1.0.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2312379209a4b02dd44d1d1febc8973a486602f95d96d7548e91e876407701ec
|
|
| MD5 |
ce7669be8485a67e7b28909beda12a6e
|
|
| BLAKE2b-256 |
67c678ab75276efda2e9501beed8b6836626cd484b4b8b1f13e4bfaa957cb130
|
File details
Details for the file embedor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: embedor-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4675edd7741a2b31b10e4dd5a1adc1d93f2dde54642a2df25bb6b6366f190b21
|
|
| MD5 |
5da6b35c3c9092e7d58a188a8e5f6198
|
|
| BLAKE2b-256 |
94094863577fbdeed83c255f293adef0dcdd41c0ce1c67189ab12e02f03fa49c
|