File: C:/Users/fred/anaconda3/Lib/site-packages/holoviews/examples/gallery/demos/bokeh/emoji_tsne.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This example represents the output the t-SNE dimensionality reduction algorithm on embeddings computed from Unicode emojis using Keras (see [Bradley Pallen's repository](https://github.com/bradleypallen/keras-emoji-embeddings) for more details). The example leverages the ``Labels`` element to visualize the Unicode emojis in the 2D coordinate system computed by the t-SNE algorithm."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import holoviews as hv\n",
"hv.extension('bokeh')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Declaring data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"emoji_df = pd.read_csv('../../../assets/emoji_embeddings.csv', index_col=0)\n",
"emojis = hv.Labels(emoji_df, label='Emoji t-SNE Embeddings').redim.range(x=(-30, 20), y=(-20, 20))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"emojis.opts(width=1000, height=800, xaxis=None, yaxis=None)"
]
}
],
"metadata": {
"language_info": {
"name": "python",
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}