t-SNE (t-Distributed Stochastic Neighbor Embedding) › Summary
Machine Learning from ScratchAll chapters t-SNE (t-Distributed Stochastic Neighbor Embedding) › SummaryOne section · Sections in this chapter7 / 8 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
t-SNE is a powerful dimensionality reduction technique for visualizing high-dimensional data by preserving local neighborhood structures. The method converts distances into probability distributions, using Gaussian distributions in the high-dimensional space and t-distributions in the low-dimensional space. This asymmetry solves the crowding problem, allowing points to spread out naturally in the visualization instead of clustering too tightly in the center.
The algorithm works by minimizing the Kullback-Leibler divergence between these two probability distributions through gradient descent. Each iteration adjusts point positions to better match the high-dimensional similarities in low-dimensional space. The perplexity parameter controls how many neighbors contribute to each point's similarity calculation, with values between 5 and 50 typically working well depending on dataset size.
Use t-SNE for exploratory data analysis, cluster validation, and outlier detection, not for feature reduction in machine learning pipelines. The method requires standardized data and works best with datasets containing 50 to 10,000 points. Always run multiple times with different random seeds to ensure stable results, and complement t-SNE with other dimensionality reduction methods like PCA or UMAP to get a complete picture of your data's structure. When used appropriately, t-SNE reveals complex non-linear relationships that linear methods cannot capture, making it valuable for understanding and communicating insights from high-dimensional datasets.