No project description provided
Project description
outerspace
An interactive widget for Jupyter notebooks to explore the parameters of t-SNE.
Installation
pip install outerspace
jupyter nbextension enable --py widgetsnbextension
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.
Source Distribution
outerspace-0.1.0.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for outerspace-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f56c2b4d1ce1c3a94657c2664b0c47d54e85b59e6dc9ce33d1534260482eb325 |
|
MD5 | 96baa87561a9d330874b052af0f90f7a |
|
BLAKE2b-256 | af5940855080a9e552237358b053b222c17b646bbee59d11f739108b39bfcf76 |