← 📊 Data Science

📊 PCA vs t-SNE

PCA (linear)t-SNE (local)
PC1 variance:
PC2 variance:
PC3 variance:
Customers: 300
FPS:
Drag — rotate · Scroll — zoom

📊 PCA vs t-SNE: Two Views of the Same Customer Segments

The same K-means-clustered customer cloud, shown two ways: a PCA rotation that keeps every true distance intact, and a t-SNE-style layout that exaggerates local neighbourhoods while discarding global distance.

🔬 What It Demonstrates

PCA rotates the data onto the axes of maximum variance — a rigid transform, so distances between any two customers (and segments) are preserved exactly. t-SNE instead pulls each segment toward its own local neighbourhood and pushes segments apart, so inter-segment distances become meaningless even though membership stays reliable.

🎮 How to Use

Drag the View slider to morph between the PCA and t-SNE layouts. Change the number of segments, the t-SNE perplexity, and how separated the underlying customer behaviours really are, and watch the two projections respond differently.

💡 Did You Know?

Because t-SNE's axes carry no fixed meaning, cluster sizes and the gaps between clusters in a t-SNE plot shouldn't be read literally — only which points end up grouped together is trustworthy, unlike PCA's physically interpretable variance axes.