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 THIS TESTS: 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.
A GOOD ANSWER COVERS: 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.
COMMON WRONG ANSWERS: 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.
LIKELY FOLLOW-UPS: 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.
ONE 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.
Source: distill.pub, How to Use t-SNE Effectively, Wattenberg et al., 2016.
Read the original → distill.pub
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.