How would you choose between PCA, t-SNE and UMAP for a given dimensionality reduction task?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
How would you choose between PCA, t-SNE and UMAP for a given dimensionality reduction task?
```hint Start from the output's job
Ask what the reduced data is for: features fed to a model, a 2D picture for people to look at, or input to a clustering step.
```
```hint Compare what each method keeps
Consider which structure each method preserves (global variance or local neighborhoods) and the practical costs: run time at large N, determinism, and whether it can place new points.
```
### What a Strong Answer Covers
- Matching the method to the goal: model features, visualization, or preprocessing for clustering.
- What each method preserves and how much its output distances and cluster sizes can be trusted.
- Practical properties: speed on large data, determinism, embedding new points, and the hyperparameters that matter.
- Combining methods, such as PCA before t-SNE or UMAP.
- How to validate structure that appears in a nonlinear embedding.
### Follow-up Questions
- Why do people often run PCA to about 50 dimensions before t-SNE or UMAP?
- What do perplexity in t-SNE and `n_neighbors` in UMAP control, and what happens at very small or very large values?
- A t-SNE plot shows one cluster much larger and farther away than the rest. What can you conclude from that?
- New points arrive every day. How would you place them in an existing 2D map?
Overview: Asks how to choose among PCA, t-SNE and UMAP for a dimensionality reduction task. Tests what each method preserves, how far its output distances can be trusted, practical limits such as speed, determinism and embedding new points, and how to validate clusters that appear in a 2D plot.