Machine Learning, FoundationsLesson 67 of 92

Module 7 · Learning without labels, and learning a representation

t-SNE and UMAP, and how they mislead

In this lesson

  • 8 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 5 of 10 in this chapter

This chapter’s goalCluster a dataset and defend the number of clusters with more than an elbow plot, reduce dimensionality with PCA and state how much information the reduction discarded, explain what an embedding is as a geometric object, and build a working nearest-neighbour search over pretrained embeddings without a GPU.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:55Not available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

A different goal from PCA

PCA preserves global structure: distances and directions across the whole dataset, as well as a linear projection can. It is often disappointing for visualisation, because two dimensions of a 300-dimensional dataset usually look like a blob.

t-SNE and UMAP have a different objective: preserve local neighbourhoods. Points that were close in the original space should be close in the plot. Points that were far can go anywhere.

That trade produces much more revealing pictures, and it is also the source of every way these plots deceive people.

Python
from sklearn.manifold import TSNE
emb = TSNE(n_components=2, perplexity=30, init="pca",
           random_state=0).fit_transform(X_reduced)

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘t-SNE and UMAP, and how they mislead’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/seeing-high-dimensional-data (Accessed: 29 November 2026).