Every point below is a real handwritten digit from scikit-learn's 8×8 digits dataset: 64 pixel values, so a point in 64-dimensional space. The PCA view is computed live in your browser; the t-SNE and UMAP views are real embeddings of the same digits, precomputed offline. See which digits cluster together, and why the three methods disagree.
PCA
Finds the directions of maximum variance (principal components) and projects the data onto them. A linear method: fast, deterministic, and interpretable. The scatter here is computed live in your browser from the 250 digits, so the overlap you see between classes is genuine. The first PC captures the most variance, the second the next most, and so on.
Strengths
Limitations
Best For
Preprocessing, noise reduction, quick initial visualization
PCA Parameters
PCA is refit live on this many digits (kept class-balanced)
Gaussian noise added to the 64 pixel values (0..16) before fitting
Component pair
Variance captured (live): PC1 16.5%, PC2 12.6%, PC3 11.7%
The PCA view is genuinely recomputed in your browser on every change. t-SNE and UMAP are too slow to run live here, so their sliders switch between real embeddings of this exact dataset, precomputed offline with scikit-learn and umap-learn.
Compression Stats
64D
Original dims
8×8 pixel digit image
2D
Reduced dims
Viewable in a scatter plot
96.9%
Reduction
Of dimensions removed
32×
Compression
Fewer numbers per image
PC1 + PC2 on screen capture 29.1% of the total variance of the selected digits (computed live). The rest is lost in the projection, which is why classes overlap.
This guide uses scikit-learn's 8×8 digits dataset. Full-size MNIST images are 28×28 = 784D, so reducing those to 2D removes 99.7% of dimensions.
Digit Classes
Hover points to highlight a digit class