How do you visualize clusters in 100-dimensional numerical data?
Tests PCA versus t-SNE tradeoffs for high-dimensional visualization. Strong answers use PCA first for global variance and outliers, then t-SNE with perplexities 5-50 run to stability. Red flag: interpreting t-SNE cluster sizes or distances as literal metrics.
What's really being asked
The interviewer wants to see if you understand that dimensionality reduction is a diagnostic workflow, not a single button press. With 100 numerical features, you must choose techniques that preserve the aspects of the data you care about. The core tension is between global structure, which PCA preserves via linear variance, and local neighborhoods, which t-SNE preserves via non-linear optimization. They are checking whether you know that t-SNE hyperparameters dramatically change the output and that naive interpretation leads to false conclusions.
The full answer
First, standardize features so scale does not dominate distance metrics. Second, run PCA to see how much variance lives in the first two components; if clusters appear there, you have strong global structure. Third, use t-SNE as a secondary exploration tool, not a replacement, because it can reveal local groupings that PCA misses. Fourth, sweep perplexity across values such as 5, 30, and 50 rather than trusting one value, since perplexity controls the effective number of neighbors and different values can reveal or hide structure. Fifth, run the optimization for thousands of iterations until stable, and repeat with different random seeds to verify that global shapes are consistent rather than artifacts.
The mistakes people make
A major red flag is jumping straight to t-SNE without PCA, because you lose global variance context and cannot tell whether the plot is distorting large-scale relationships. Another error is treating distances between clusters in t-SNE as meaningful; the algorithm does not preserve inter-cluster distances, so groups that look far apart might be close in the original space. Similarly, cluster sizes and densities in the visualization are not reliable indicators of true spread or cardinality. Stopping too early, such as after 100 iterations, produces pinched artifacts that look like structure but are optimization noise. Using a single perplexity value and declaring the result final also shows a lack of awareness about sensitivity to that hyperparameter.
What usually comes next
The interviewer might ask how you would validate that the clusters in the 2D plot are real, which you can answer by comparing assignments to a clustering algorithm like k-means or HDBSCAN run on the original data. They could ask what you would do if PCA shows that 95 percent of variance is in the first two components, in which case the clusters are likely linearly separable and t-SNE adds little value. Another follow-up is how you would handle categorical features mixed with the numerical ones, pushing you toward UMAP or encoded PCA. They might also ask whether you would run t-SNE on all 100 features or on a PCA-reduced subset first, which improves speed and stability.
A concrete example
Suppose you have a customer dataset with 100 behavioral metrics. You standardize and run PCA, finding that the first two components capture only 15 percent of variance and no obvious clusters appear. You then run t-SNE with perplexity 5, 30, and 50 for 5000 iterations each. At perplexity 30, four distinct blobs stabilize across three random seeds, but at perplexity 5 the blobs fragment into many tiny groups. You do not conclude the blobs are four clusters; instead you run k-means with k equals 4 on the original scaled data and find the silhouette score supports the grouping, giving you confidence that the visualization reflects real structure.
Interview question
You standardize 100 numerical features and find PCA's first two components capture 90% of variance with visually distinct clusters. What is the most appropriate next step?
- a.Use only the top two PCA components for downstream clustering to eliminate the remaining noise.
- b.Rely primarily on PCA for visualization, as t-SNE adds little value when clusters are linearly separable with high variance capture.Correct
- c.Set t-SNE perplexity proportional to the variance ratio to preserve the global structure in the embedding.
- d.Run t-SNE to confirm the clusters, since PCA's linear projection can miss true non-linear boundaries.
Why? this is the answer
When PCA captures most variance and reveals clear clusters, the structure is globally linear, so t-SNE is unnecessary and can mislead. Option D is tempting but wrong because it assumes PCA's linear projection is insufficient and falsely requires t-SNE validation, losing the global variance context.
Just read this? Test yourself on what you have been reading.
Read the original → distill.pub
- #dimensionality reduction
- #pca
- #t-sne
- #data visualization
- #clustering
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles