SlideShare a Scribd company logo
7
Most read
9
Most read
11
Most read
Good visualization
Mathematical framework
Implementation
Visualizing Data Using t-SNE
David Khosid
Dec. 21, 2015
1 / 20
Good visualization
Mathematical framework
Implementation
Agenda
Good visualization
Mechanics of t-SNE
Examples: image, text, voice
Scalability: large datasets visualization, up to tens of millions
Implementations: scikit-learn, Matlab, Torch
2 / 20
Good visualization
Mathematical framework
Implementation
MNIST visualization with PDA
This PDA visualization is terrible
3 / 20
Good visualization
Mathematical framework
Implementation
MNIST visualization with t-SNE in 2D
t-SNE visualization can help you identify various clusters.
Youtube link to 3D t-SNE
(a) MNIST in t-SNE (b) Learning animation (view with Adobe
Reader)
4 / 20
Good visualization
Mathematical framework
Implementation
Good visualization (requirements)
Each high-dimensional object is represented by a
low-dimensional object.
Preserve the neighborhood
Distant points correspond to dissimilar objects
Scalability: large, high-dimensional data sets.
5 / 20
Good visualization
Mathematical framework
Implementation
Manifold Learning
Manifolds
MNIST: 10 intrinsic
dimensions in 28x28 images
Images - ˜100 dims
Text - ˜1000 dims
PCA
PCA is mainly concerned
dimensionality, with preserving
large pairwise distances in the
map
Swiss Roll
6 / 20
Good visualization
Mathematical framework
Implementation
Idea of t-SNE
A data point - is a point xi in the original data space RD
A map point - is a point yi in the map space R2/R3. Every
map point represents one of the original data points
t-SNE is a visualization algorithm that choose positions of the
map points in R2/R3
t-SNE procedure:
1 Compute an N × N similarity matrix in the original RD space
2 Define an N × N similarity matrix the low-dimensional
embedding space - a learn objective
3 Define cost function - Kullback-Leibler divergence between
the two probability distributions
4 Learn low-dimensional embedding
Result: t-SNE focuses on accurately modelling small pairwise
distances, i.e., on preserving local data structure in the R2/R3
7 / 20
Good visualization
Mathematical framework
Implementation
Conditional similarity between two data points
Similarity of datapoints (xi ) in data space RD
pj|i =
exp(−
xi −xj
2
2σ2
i
)
k=m exp(− xk −xm
2
2σ2
i
)
pj|i measures how close xj is from xi , considering Gaussian
distribution around xi with a given variance σ2
i .
8 / 20
Good visualization
Mathematical framework
Implementation
Symmetric similarity
Similarity of datapoints (xi ) in data space RD
pj|i =
exp(−
xi −xj
2
2σ2
i
)
k=m exp(− xk −xm
2
2σ2
i
)
(1)
Make the similarity metric pij symmetric. The main advantage of
symmetry is simplifying the gradient (learning stage):
pij =
pi|j + pj|i
2N
(2)
we set pii = 0, as we interested in pairwise similarities
σi is chosen such that the data point has a fixed perplexity
(effective number of neighbors).
9 / 20
Good visualization
Mathematical framework
Implementation
Similarity of map points in Low Dimension
Student t-distribution with one degree of freedom (same as Cauchy
distribution)
qij =
(1 + yi − yj
2)−1
k=m(1 + yk − ym
2)−1
(3)
we set qii = 0, as we interested in pairwise similarities
heavy-tail (will be discussed later)
still closely related to the Gaussian
computationally convenient (no exponent)
10 / 20
Good visualization
Mathematical framework
Implementation
Kullback-Leibler divergence (Cost Function)
(pij) is fixed, (qij) is flexible.
We want (pij) and (qij) to be as close as possible.
C =
i
KL(Pi Qi ) =
i j
pji log
pij
qij
(4)
KL divergence:
is not a distance, since it is asymmetric
large pij modelled by small qij → large penalty
Small pij modelled by large qij → small penalty
KL divergence meaning: cross-entropy
11 / 20
Good visualization
Mathematical framework
Implementation
Learning: Gradient of t-SNE
t-SNE algorithm minimizes KL divergence between P and Q
distributions.
∂C
∂y
= 4
i=j
(pij − qij)
yi − yj
1 + yi − yj
2
(5)
positive → attraction, negative →
repulsion
(dissimilar DPs, similar MPs) → repulsion
repulsions do not go to infinity
12 / 20
Good visualization
Mathematical framework
Implementation
Learning: Physical Analogy
∂C
∂y
= 4
i=j
(pij − qij)
yi − yj
1 + yi − yj
2
Physical Analogy: F = −k ∗ ∆x, attraction/repulsion
13 / 20
Good visualization
Mathematical framework
Implementation
Why t-Student for qij, instead of Gaussian?
Q: How many equidistant datapoints in 10 dimensions?
Crowding Problem: the area of the 2D map that is available to
accomodate moderately distant datapoints will not be large
enough compared with the area available to accommodate nearby
datapoints.
14 / 20
Good visualization
Mathematical framework
Implementation
t-SNE in sklearn
Follow example:
http://alexanderfabisch.github.io/t-sne-in-scikit-learn.html
15 / 20
Good visualization
Mathematical framework
Implementation
Scalability: Barnes-Hut-SNE
Original t-SNE data and computational complexity is O(N2).
Limits 10K points.
Reduce complexity to O(N ∗ log(N)) via Barnes-Hut-SNE
(tree-based) algorithm. Up to tens of millions data points.
16 / 20
Good visualization
Mathematical framework
Implementation
Review of t-SNE for Images, Speach, Text
(Flash Player should be installed on Windows, to see the embedded video)
17 / 20
Good visualization
Mathematical framework
Implementation
Additional points
Q: Every time I run t-SNE, I get a (slightly) different result?
Discussion: KL divergence in informative theory
Q: We want pij = pji and defined pij =
pi|j +pj|i
2N . Why we
chose symmetric similarity metric?
Discussion: What is the best visualization method for
high-dimensional data so far?
Q: Is it feasible to use t-SNE to reduce a dataset to one
dimension?
A: yes
18 / 20
Good visualization
Mathematical framework
Implementation
Summary, Q&A
t-SNE is an effective method to visualize a complex datasets
t-SNE exposes natural clusters
Implemented in many languages
Scalable with O(NlogN) version
19 / 20
Good visualization
Mathematical framework
Implementation
References
Laurens van der Maaten’ page: https://lvdmaaten.github.io/tsne/
Kevin Murphy ”Machine Learning: a Probabilistic Perspective”,
MIT, 2012
https://www.oreilly.com/learning/an-illustrated-introduction-to-the-
t-sne-algorithm
20 / 20
Visualizing Data Using t-SNE
Visualizing Data Using t-SNE

More Related Content

PPTX
PPT
Advanced Sql Training
PDF
Business intelligence
PPTX
Introduction to time series.pptx
PPTX
Netflix Recommender System : Big Data Case Study
PDF
Ejercicios resueltos de pruebas de hipótesis
PDF
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Advanced Sql Training
Business intelligence
Introduction to time series.pptx
Netflix Recommender System : Big Data Case Study
Ejercicios resueltos de pruebas de hipótesis
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf

What's hot (20)

PDF
High Dimensional Data Visualization using t-SNE
PPTX
Visualization using tSNE
PDF
Dimensionality reduction with UMAP
PPT
3.3 hierarchical methods
PDF
Convolutional Neural Networks (CNN)
PPTX
Fuzzy Clustering(C-means, K-means)
PDF
Matrix Factorization
PDF
Faster R-CNN - PR012
PPTX
Birch Algorithm With Solved Example
PDF
Temporal difference learning
PPTX
Chapter 4 Classification
PDF
K - Nearest neighbor ( KNN )
PDF
Principal Component Analysis
PDF
K means Clustering
PPTX
Decision Tree Learning
PDF
Overview on Optimization algorithms in Deep Learning
PDF
Dimensionality Reduction
PDF
Reinforcement Learning 8: Planning and Learning with Tabular Methods
PPT
K mean-clustering algorithm
PPTX
Data Preprocessing
High Dimensional Data Visualization using t-SNE
Visualization using tSNE
Dimensionality reduction with UMAP
3.3 hierarchical methods
Convolutional Neural Networks (CNN)
Fuzzy Clustering(C-means, K-means)
Matrix Factorization
Faster R-CNN - PR012
Birch Algorithm With Solved Example
Temporal difference learning
Chapter 4 Classification
K - Nearest neighbor ( KNN )
Principal Component Analysis
K means Clustering
Decision Tree Learning
Overview on Optimization algorithms in Deep Learning
Dimensionality Reduction
Reinforcement Learning 8: Planning and Learning with Tabular Methods
K mean-clustering algorithm
Data Preprocessing
Ad

Similar to Visualizing Data Using t-SNE (20)

PDF
Weakly supervised semantic segmentation of 3D point cloud
PDF
REGRESION LOGISTICA MEDIANTE MODELOS MATEMATICOS
PDF
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
PPT
Aggregation computation over distributed data streams(the final version)
PDF
2012 mdsp pr13 support vector machine
PDF
Mathematical foundation machine learning.pdf
PPTX
PCA and SVD in brief
PDF
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
PDF
Making BIG DATA smaller
PDF
Presentation
PDF
13th Athens Big Data Meetup - 2nd Talk - Training Neural Networks With Enterp...
PPTX
Rendering of Complex 3D Treemaps (GRAPP 2013)
PPT
Lect4
PDF
Kernel methods and variable selection for exploratory analysis and multi-omic...
PDF
STATE SPACE GENERATION FRAMEWORK BASED ON BINARY DECISION DIAGRAM FOR DISTRIB...
PDF
STATE SPACE GENERATION FRAMEWORK BASED ON BINARY DECISION DIAGRAM FOR DISTRIB...
PDF
Spme 2013 segmentation
PDF
PDF
An Efficient Method of Partitioning High Volumes of Multidimensional Data for...
Weakly supervised semantic segmentation of 3D point cloud
REGRESION LOGISTICA MEDIANTE MODELOS MATEMATICOS
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
Aggregation computation over distributed data streams(the final version)
2012 mdsp pr13 support vector machine
Mathematical foundation machine learning.pdf
PCA and SVD in brief
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
Making BIG DATA smaller
Presentation
13th Athens Big Data Meetup - 2nd Talk - Training Neural Networks With Enterp...
Rendering of Complex 3D Treemaps (GRAPP 2013)
Lect4
Kernel methods and variable selection for exploratory analysis and multi-omic...
STATE SPACE GENERATION FRAMEWORK BASED ON BINARY DECISION DIAGRAM FOR DISTRIB...
STATE SPACE GENERATION FRAMEWORK BASED ON BINARY DECISION DIAGRAM FOR DISTRIB...
Spme 2013 segmentation
An Efficient Method of Partitioning High Volumes of Multidimensional Data for...
Ad

Recently uploaded (20)

PPTX
1_Introduction to advance data techniques.pptx
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PDF
annual-report-2024-2025 original latest.
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
SAP 2 completion done . PRESENTATION.pptx
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPTX
Introduction to machine learning and Linear Models
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PDF
[EN] Industrial Machine Downtime Prediction
PDF
Business Analytics and business intelligence.pdf
1_Introduction to advance data techniques.pptx
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Qualitative Qantitative and Mixed Methods.pptx
Miokarditis (Inflamasi pada Otot Jantung)
annual-report-2024-2025 original latest.
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
SAP 2 completion done . PRESENTATION.pptx
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
IB Computer Science - Internal Assessment.pptx
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Introduction to machine learning and Linear Models
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
[EN] Industrial Machine Downtime Prediction
Business Analytics and business intelligence.pdf

Visualizing Data Using t-SNE