PCA vs t-SNE Comparison
About This MicroSim
This MicroSim demonstrates the differences between PCA and t-SNE dimensionality reduction techniques by showing the same data reduced with both methods side-by-side.
Iframe Embed Code
1 2 | |
Description
Comparing Reduction Techniques
| Aspect | PCA | t-SNE |
|---|---|---|
| Preserves | Global variance | Local neighborhoods |
| Speed | Fast | Slower |
| Deterministic | Yes | No (random init) |
| Cluster separation | Often overlapping | Usually clearer |
| Distance meaning | Globally meaningful | Only locally meaningful |
How to Use
- Compare both plots - Same points, different positions
- Click any point - Selection syncs across both views
- Toggle cluster boundaries - See groupings in each projection
- Toggle linked hover - Hover highlights same point in both
Visual Elements
- Left plot: PCA projection (linear, global structure)
- Right plot: t-SNE projection (nonlinear, local structure)
- Annotations: Key differences highlighted
- Synced selection: Selected point shown in both views
Learning Objectives
After using this MicroSim, students will be able to:
- Compare PCA and t-SNE dimensionality reduction
- Identify differences in cluster separation
- Explain when to use each technique
Lesson Plan
Introduction (5 minutes)
- Review why we reduce dimensions (visualization, exploration)
- Introduce PCA as "find directions of maximum variance"
- Introduce t-SNE as "preserve local neighborhoods"
Comparative Analysis (15 minutes)
- Look at both plots without cluster boundaries
- Enable cluster boundaries - which shows clearer separation?
- Click different points, observe their neighborhoods
- Notice: Math cluster overlaps in PCA but separates in t-SNE
Critical Thinking (10 minutes)
- Why might clusters overlap in PCA?
- Why does t-SNE create clearer separation?
- What information is lost in each projection?
- Can you trust distances between clusters in t-SNE?
Discussion (5 minutes)
- When would you use PCA? (Quick overview, reproducibility)
- When would you use t-SNE? (Cluster exploration, publication figures)
- What about UMAP? (Another popular alternative)