Skip to main content

openTSNE

Build Status Documentation Status Codacy Badge License Badge

openTSNE is a modular Python implementation of t-Distributed Stochasitc Neighbor Embedding (t-SNE) [1], a popular dimensionality-reduction algorithm for visualizing high-dimensional data sets. openTSNE incorporates the latest improvements to the t-SNE algorithm, including the ability to add new data points to existing embeddings [2], massive speed improvements [3] [4], enabling t-SNE to scale to millions of data points and various tricks to improve global alignment of the resulting visualizations [5].

Macosko 2015 mouse retina t-SNE embedding

A visualization of 44,808 single cell transcriptomes obtained from the mouse retina [6] embedded using the multiscale kernel trick to better preserve the global aligment of the clusters.

Installation

openTSNE requires Python 3.6 or higher in order to run.

Conda

openTSNE can be easily installed from conda-forge with

conda install --channel conda-forge opentsne

Conda package

PyPi

openTSNE is also available through pip and can be installed with

pip install opentsne

PyPi package

Installing from source

If you wish to install openTSNE from source, please run

python setup.py install

in the root directory to install the appropriate dependencies and compile the necessary binary files.

Please note that openTSNE requires a C/C++ compiler to be available on the system. Additionally, numpy must be pre-installed in the active environment.

In order for openTSNE to utilize multiple threads, the C/C++ compiler must support OpenMP. In practice, almost all compilers implement this with the exception of older version of clang on OSX systems.

To squeeze the most out of openTSNE, you may also consider installing FFTW3 prior to installation. FFTW3 implements the Fast Fourier Transform, which is heavily used in openTSNE. If FFTW3 is not available, openTSNE will use numpy’s implementation of the FFT, which is slightly slower than FFTW. The difference is only noticeable with large data sets containing millions of data points.

A hello world example

Getting started with openTSNE is very simple. First, we’ll load up some data using scikit-learn

from sklearn import datasets

iris = datasets.load_iris()
x, y = iris["data"], iris["target"]

then, we’ll import and run

from openTSNE import TSNE

embedding = TSNE().fit(x)

Citation

If you make use of openTSNE for your work we would appreciate it if you would cite the paper

@article {Poli{\v c}ar731877,
    author = {Poli{\v c}ar, Pavlin G. and Stra{\v z}ar, Martin and Zupan, Bla{\v z}},
    title = {openTSNE: a modular Python library for t-SNE dimensionality reduction and embedding},
    year = {2019},
    doi = {10.1101/731877},
    publisher = {Cold Spring Harbor Laboratory},
    URL = {https://www.biorxiv.org/content/early/2019/08/13/731877},
    eprint = {https://www.biorxiv.org/content/early/2019/08/13/731877.full.pdf},
    journal = {bioRxiv}
}

openTSNE implements two efficient algorithms for t-SNE. Please consider citing the original authors of the algorithm that you use. If you use FIt-SNE (default), then the citation is [4] below, but if you use Barnes-Hut the citation is [3].

References

Metadata

Release files for openTSNE 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openTSNE 0.4.0
File Size Uploaded Provenance Actions
openTSNE-0.4.0.tar.gz 853.7 kB Without provenance Details for openTSNE-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for openTSNE 0.4.0
File Actions
openTSNE-0.4.0-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for openTSNE-0.4.0-cp37-cp37m-win_amd64.whl
openTSNE-0.4.0-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details for openTSNE-0.4.0-cp37-cp37m-manylinux1_x86_64.whl
openTSNE-0.4.0-cp37-cp37m-macosx_10_13_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64 Details for openTSNE-0.4.0-cp37-cp37m-macosx_10_13_x86_64.whl
openTSNE-0.4.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for openTSNE-0.4.0-cp36-cp36m-win_amd64.whl
openTSNE-0.4.0-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details for openTSNE-0.4.0-cp36-cp36m-manylinux1_x86_64.whl
openTSNE-0.4.0-cp36-cp36m-macosx_10_13_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.13+ x86-64 Details for openTSNE-0.4.0-cp36-cp36m-macosx_10_13_x86_64.whl

Total release size: 5.4 MB

Release files / openTSNE-0.4.0.tar.gz

Download URL openTSNE-0.4.0.tar.gz
Size 853.7 kB
Tags Source
SHA-256 checksum
How to use checksums
253698f39242af883cc79f6e6764f311c4e988a0f3c5e4c7a49e9ce0851d2694
BLAKE2b-256 checksum
How to use checksums
eeccbf2c3ae46c567ffcb793ac1c27b5de49258d2af749c0853a52b5c912fb55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Release files / openTSNE-0.4.0-cp37-cp37m-win_amd64.whl

Download URL openTSNE-0.4.0-cp37-cp37m-win_amd64.whl
Size 384.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
b0f78de6ee36d2719ac174a13adf8a96ca3210734b96a6f284368708ed572451
BLAKE2b-256 checksum
How to use checksums
20aa2ccbec0b1b2d2220b6439992586809d04da59e766b3464db27c8b23a0201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Release files / openTSNE-0.4.0-cp37-cp37m-manylinux1_x86_64.whl

Download URL openTSNE-0.4.0-cp37-cp37m-manylinux1_x86_64.whl
Size 1.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bcb911a7b40c3899804545665e79e7332f862ba9babe076097da7aaacd3ce5ba
BLAKE2b-256 checksum
How to use checksums
6257b53a66c2cce85059a4068cf15a8efc2e89998ef981f608eae65bc8c0d95b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Release files / openTSNE-0.4.0-cp37-cp37m-macosx_10_13_x86_64.whl

Download URL openTSNE-0.4.0-cp37-cp37m-macosx_10_13_x86_64.whl
Size 404.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
fa3ac37faa5147d770621e3835eec6e569c4a7e44d0b6fe14d2424ab133e28f3
BLAKE2b-256 checksum
How to use checksums
9d63e6275ec43060960b46d817c1ffecc1cfb82530ae58962e06f39b9f61ed47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Release files / openTSNE-0.4.0-cp36-cp36m-win_amd64.whl

Download URL openTSNE-0.4.0-cp36-cp36m-win_amd64.whl
Size 384.2 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
134e5dee2f8d85eef458ca86571964ebb8b70169b55106a333cee6f60a3e3ac9
BLAKE2b-256 checksum
How to use checksums
0eb7e206913c39758e55ec8ae66d40855382de9a96c3f7f2149d93a19305606b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Release files / openTSNE-0.4.0-cp36-cp36m-manylinux1_x86_64.whl

Download URL openTSNE-0.4.0-cp36-cp36m-manylinux1_x86_64.whl
Size 1.5 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
5e2e6a53f2a24e9c7e87844deb011d9aedafd45269ebc0a10bc1fb2f6621e84b
BLAKE2b-256 checksum
How to use checksums
ab79e060919deceba813e695815e752715948e756e5a15909f95ec40bd5e704a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Release files / openTSNE-0.4.0-cp36-cp36m-macosx_10_13_x86_64.whl

Download URL openTSNE-0.4.0-cp36-cp36m-macosx_10_13_x86_64.whl
Size 405.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
9de7860fef511c57d5280de27286ba6b3fe174155c1f0b3c23ad72a80a6e0922
BLAKE2b-256 checksum
How to use checksums
59aae05c64b5cbfb4cdca182eff768c21ed275a835553c31e5c04898d795d23f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.12

Security for openTSNE 0.4.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page