Extensible, parallel implementations of t-SNE
Project description
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] [5], enabling t-SNE to scale to millions of data points and various tricks to improve global alignment of the resulting visualizations [6].
Installation
openTSNE requires Python 3.8 or higher in order to run.
Conda
openTSNE can be easily installed from conda-forge with
conda install --channel conda-forge opentsne
PyPi
openTSNE is also available through pip and can be installed with
pip install opentsne
Installing from source
If you wish to install openTSNE from source, please run
pip 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.
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{Policar2024,
title={openTSNE: A Modular Python Library for t-SNE Dimensionality Reduction and Embedding},
author={Poli{\v c}ar, Pavlin G. and Stra{\v z}ar, Martin and Zupan, Bla{\v z}},
journal={Journal of Statistical Software},
year={2024},
volume={109},
number={3},
pages={1–30},
doi={10.18637/jss.v109.i03},
url={https://www.jstatsoft.org/index.php/jss/article/view/v109i03}
}
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 [5] below, but if you use Barnes-Hut the citations are [3] and [4].
References
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 Distributions
Hashes for openTSNE-1.0.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f342ec51fe365cd1a23ad25e6a7b5417f8bd1bf4d71a5d526f42ad4c4b64114 |
|
MD5 | 35c90c152198383a9bce9bf5bb158ab4 |
|
BLAKE2b-256 | aed14cf81122288257765600faa093121530503d2893d56f9e5f68702dbd5da0 |
Hashes for openTSNE-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f24d7d139bd466f00ae765120c3a8049ceddc1282e63d75e3406c3ac3b3783 |
|
MD5 | 9dcc2630549fda0ed6ea4b1ea08872b3 |
|
BLAKE2b-256 | 3c9ebc5edb00d363dcaf3c3708036c60930d18797621dfa1651bbf68245ab30f |
Hashes for openTSNE-1.0.2-cp312-cp312-macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0de8826568aa4f03658274edb393a5be031f771ea86f3493e91aecad27100c56 |
|
MD5 | 41d2d49d92d850509503f7d27ec490ea |
|
BLAKE2b-256 | 0bc22032c772b0bce9c09fdb3cd45bdb6cfe1e7b177ce1f5e21952cc49af264b |
Hashes for openTSNE-1.0.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6799cb38e560e50f5ea932be587ad3efd4cf62d5a55d28c3061ca3e2aee210ce |
|
MD5 | 39b7e38402a934f0de7e1ae0400b7a5b |
|
BLAKE2b-256 | 046d1fb263a8b48d6350ea919ff30956caeff65b9c030dae0aada2093acd0d7c |
Hashes for openTSNE-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949f694893fd4f803acb513bc2e3d80ef04b707166c28a469ca43033f52b8e1b |
|
MD5 | f41422f2659af1adf67d3af3689b2e97 |
|
BLAKE2b-256 | fc68243fb74f0b0c0e245f67048ad8658e444c7d92d9623812bd5f1123eaf326 |
Hashes for openTSNE-1.0.2-cp311-cp311-macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7882df123f210946d2806fb73feec3666e76eee2d6b6744893e14203e0641a38 |
|
MD5 | a2977aab8710874f98b13bfb420f1899 |
|
BLAKE2b-256 | cdfa0807e7a219889dc69f25a05fdd20872513b179483630b6b52bbfccdfab47 |
Hashes for openTSNE-1.0.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99c90695c95f09a100216532d1cb7ec24a6269dd005f1e835c1ca0d603d43542 |
|
MD5 | 14ed93a24731c61288e8ea4ddedaf86b |
|
BLAKE2b-256 | d9b601c699b76282f63b2fea438ba0d22bec15dbcc2e4c30234b729594049e4d |
Hashes for openTSNE-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a7270156cbabc249301cd30f6010387f618295ca68c50913c98b9dad8d9c682 |
|
MD5 | 2ff8117c7e629ae8c189007c6e69bc2f |
|
BLAKE2b-256 | d975e032529880ccd24de86e6c7988a50e0fc8ad001a829aa3a398a947168f15 |
Hashes for openTSNE-1.0.2-cp310-cp310-macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82a2c263e570c75256d58590f7c99273c8f8152fada2e3f36a3de92d165a483 |
|
MD5 | c99ffc13192ddec0400979cf9b28943d |
|
BLAKE2b-256 | 558e2b5b0fb28c721d3023baa36859e209dbbdd45786e1d622ec1e484220d4f3 |
Hashes for openTSNE-1.0.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c927dc2b47560d06abab48a8cca0ddf388a9200a2d27fc197c786b15f644e7c |
|
MD5 | e1d96f29decc473c5a392693f11afd36 |
|
BLAKE2b-256 | 2928da77c553872d16fc54a133c478173782ae3b5289d4b47314019d35a0703f |
Hashes for openTSNE-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e349d876a26f417326b0aa4e031f2ca5af167608538eaae2b5d2fbaabd353df |
|
MD5 | 8520cbd00a3928e54dd685514ee81a39 |
|
BLAKE2b-256 | 02f5ddcead14d625cc09c1779304d22aac41d3d06552a8f8bb6680d8d67e28da |
Hashes for openTSNE-1.0.2-cp39-cp39-macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78d1122ce9233ba3e9de07825127b34b3f330665047f3e04c3914ee0e2b3fad2 |
|
MD5 | 4a06c96eb9b667bb227c173f855fd8e9 |
|
BLAKE2b-256 | 14a572aad8de41cc577c6b34977a4cbdb97e5bf2c1141d3430191da16cd7b1dc |