Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

No project description provided

Project description

outerspace

An interactive widget for Jupyter notebooks to explore the parameters of t-SNE or UMAP.

outerspace demo

Installation

pip install outerspace

Additionally, if you use jupyter notebook:

jupyter nbextension enable --py widgetsnbextension

... or for jupyter lab:

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab_bokeh

Usage

Run t-SNE on the digits data set (see result in the image above):

from outerspace import tsne_playground
from sklearn.datasets import load_digits
digits = load_digits()
X, y = digits.data, digits.target
tsne_playground(X, y)

Show the actual digit images in a tooltip:

from outerspace import tsne_playground, array2d_to_html_img
from sklearn.datasets import load_digits

digits = load_digits()
X, y, images = digits.data, digits.target, digits.images

images = 256 - images * 16      # convert range and invert
images = images.clip(0, 255)    # clip values at 255
images = images.astype('uint8') # convert to uint8
images = [array2d_to_html_img(image, resize=(32,32))
          for image in images]  # convert to HTML images

tsne_playground(X, y,
                additional_columns=dict(images=images),
                tooltips='@images{safe}') # safe = do not escape HTML

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for outerspace, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size outerspace-0.2.3.tar.gz (11.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page