jaxsne
A library for doing dimensionality reduction in different metric spaces, or using different distributions.
In addition to regular t-SNE for MNIST
this can also be used to embed points on the sphere
or even into hierarchical hyperbolic space
The downside is that this is generally less performant than the t-SNE provided by scikit-learn, so should only be used if you want to tweak the metrics or measures.
Installation
pip install jaxsne
Basic Usage
import jaxsne
data = ... # n x d
reduced = jaxsne.sne(data)
# or
reduced = jaxsne.scaling(data)
Advanced Usage
import jaxsne
import jax
from jax import Array
from jax import numpy as jnp
@jax.jit
def manhattan(left: Array, right: Array) -> Array:
return jnp.abs(left - right).sum(-1)
data = ... # n x d
reduced = jaxsne.sne(data, in_metric=manhattan, out_metric=manhattan)
Development
uv run ruff format --check
uv run ruff check
uv run pyright
uv run pytest
Publishing
Releases are cut by manually dispatching the release workflow, which gates on
CI, builds, and publishes to PyPI via trusted publishing.
Tasks
- Extend to Barnes-Hut-SNE
Metadata
Release files for jaxsne 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jaxsne-0.3.1.tar.gz | 599.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jaxsne-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 610.0 kB
Release files / jaxsne-0.3.1.tar.gz
| Download URL | jaxsne-0.3.1.tar.gz |
|---|---|
| Size | 599.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e400d005aaa0aebee29a8ad72af7db2396882f44061580c612e33c6aedfe49ec
|
|
BLAKE2b-256 checksum How to use checksums |
892e61ffc749e3a0e588fadd373f2bf78efa28f9e5c154de36fdcc1657755166
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / jaxsne-0.3.1-py3-none-any.whl
| Download URL | jaxsne-0.3.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daa4c53532c49e62626e4e2fba746b7f6ed8be9e3191d1294f5ae67fe1826591
|
|
BLAKE2b-256 checksum How to use checksums |
2f6d538041af8e785d2582dac0ac5951a7ddc67627d76d79d44d3241abbf9c10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency log