HomeAI & Machine LearningPCA vs t-SNE: Two Views of the Same Customer Segments

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

Morph a 3D cloud of K-means customer segments between its PCA rotation and a t-SNE-style layout, and see how each method preserves — or distorts — distance and structure.

AI & Machine Learning3DAdvanced60 FPS
pca-vs-tsne-customer-segmentation-marketing-lab ↗ Open standalone

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.

⚙ Under the hood

Morph a 3D cloud of K-means customer segments between its PCA rotation and a t-SNE-style layout, and see how each method preserves — or distorts — distance and structure.

machine learningclusteringdimensionality reductionvisualizationdata analysisalgorithmsThree.js

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)