Rajiv Shah /ML / AI ARCADETeaching ↗
STUDY / 05

Explore Dimensionality Reduction

Reveal structure in fewer dimensions.

Original · 3D

96 points
xyzPoint 1Point 2Point 3Point 4Point 5Point 6Point 7Point 8Point 9Point 10Point 11Point 12Point 13Point 14Point 15Point 16Point 17Point 18Point 19Point 20Point 21Point 22Point 23Point 24Point 25Point 26Point 27Point 28Point 29Point 30Point 31Point 32Point 33Point 34Point 35Point 36Point 37Point 38Point 39Point 40Point 41Point 42Point 43Point 44Point 45Point 46Point 47Point 48Point 49Point 50Point 51Point 52Point 53Point 54Point 55Point 56Point 57Point 58Point 59Point 60Point 61Point 62Point 63Point 64Point 65Point 66Point 67Point 68Point 69Point 70Point 71Point 72Point 73Point 74Point 75Point 76Point 77Point 78Point 79Point 80Point 81Point 82Point 83Point 84Point 85Point 86Point 87Point 88Point 89Point 90Point 91Point 92Point 93Point 94Point 95Point 96

Rotation changes the view, not the data.

2D
Point 1Point 2Point 3Point 4Point 5Point 6Point 7Point 8Point 9Point 10Point 11Point 12Point 13Point 14Point 15Point 16Point 17Point 18Point 19Point 20Point 21Point 22Point 23Point 24Point 25Point 26Point 27Point 28Point 29Point 30Point 31Point 32Point 33Point 34Point 35Point 36Point 37Point 38Point 39Point 40Point 41Point 42Point 43Point 44Point 45Point 46Point 47Point 48Point 49Point 50Point 51Point 52Point 53Point 54Point 55Point 56Point 57Point 58Point 59Point 60Point 61Point 62Point 63Point 64Point 65Point 66Point 67Point 68Point 69Point 70Point 71Point 72Point 73Point 74Point 75Point 76Point 77Point 78Point 79Point 80Point 81Point 82Point 83Point 84Point 85Point 86Point 87Point 88Point 89Point 90Point 91Point 92Point 93Point 94Point 95Point 96
61%original neighbors retained

Keep the directions with most variance.
74.9% variance retained

2D
Point 1Point 2Point 3Point 4Point 5Point 6Point 7Point 8Point 9Point 10Point 11Point 12Point 13Point 14Point 15Point 16Point 17Point 18Point 19Point 20Point 21Point 22Point 23Point 24Point 25Point 26Point 27Point 28Point 29Point 30Point 31Point 32Point 33Point 34Point 35Point 36Point 37Point 38Point 39Point 40Point 41Point 42Point 43Point 44Point 45Point 46Point 47Point 48Point 49Point 50Point 51Point 52Point 53Point 54Point 55Point 56Point 57Point 58Point 59Point 60Point 61Point 62Point 63Point 64Point 65Point 66Point 67Point 68Point 69Point 70Point 71Point 72Point 73Point 74Point 75Point 76Point 77Point 78Point 79Point 80Point 81Point 82Point 83Point 84Point 85Point 86Point 87Point 88Point 89Point 90Point 91Point 92Point 93Point 94Point 95Point 96
9%original neighbors retained

Bring likely neighbors together in 2D.
0 / 500 iterations · KL 1.513

Colors track source position or known groups; algorithms never use them. Each plot fits its own range with equal axis scaling. t-SNE uses 100 warm-up steps with early exaggeration, then 400 refinement steps.

Inspect original and reduced coordinates
PointOriginal x / y / zpca 1 / 2tsne 1 / 2
0.109 / -0.615 / -1.104-0.683 / -0.7720.000 / 0.000
-0.930 / -0.669 / -0.283-0.760 / 0.540-0.000 / 0.000
0.408 / 0.522 / -0.375-0.156 / -0.411-0.000 / -0.000
0.342 / 0.093 / 0.6530.627 / 0.302-0.000 / 0.000
0.471 / 0.367 / 0.5350.578 / 0.1480.000 / 0.000
1.149 / -0.390 / -0.4150.466 / -1.0480.000 / 0.000
0.551 / -0.603 / 0.4220.720 / -0.059-0.000 / -0.000
-0.355 / 0.478 / -1.005-1.112 / -0.284-0.000 / 0.000
0.274 / -0.033 / 0.6960.636 / 0.3720.000 / -0.000
0.257 / 0.340 / -1.093-0.748 / -0.8010.000 / -0.000
-0.859 / 0.217 / -0.503-1.031 / 0.405-0.000 / -0.000
-0.820 / -0.188 / -0.579-0.989 / 0.2950.000 / -0.000
0.301 / -0.872 / -0.438-0.025 / -0.4790.000 / -0.000
1.191 / -0.359 / 0.5141.166 / -0.4460.000 / 0.000
-0.659 / 0.270 / 0.569-0.126 / 0.991-0.000 / 0.000
-0.571 / -0.908 / -0.871-0.910 / -0.138-0.000 / -0.000
0.570 / 0.606 / 0.3860.491 / -0.007-0.000 / 0.000
0.477 / 0.914 / -0.313-0.135 / -0.390-0.000 / -0.000
0.095 / -0.781 / 0.7670.703 / 0.4960.000 / 0.000
0.536 / -0.606 / -1.015-0.338 / -1.023-0.000 / 0.000
-0.433 / 0.454 / 0.7190.100 / 0.9410.000 / -0.000
0.406 / 0.527 / -0.377-0.160 / -0.4100.000 / 0.000
0.508 / 0.624 / 0.4880.522 / 0.1080.000 / -0.000
0.897 / -0.286 / 0.9961.311 / 0.101-0.000 / 0.000
0.636 / -0.547 / 0.1210.547 / -0.3210.000 / -0.000
1.182 / 0.121 / -0.3370.453 / -0.9810.000 / -0.000
0.368 / -0.749 / -1.071-0.464 / -0.949-0.000 / -0.000
-0.897 / 0.843 / 0.204-0.652 / 0.959-0.000 / -0.000
-0.697 / 0.674 / -0.751-1.187 / 0.152-0.000 / 0.000
0.387 / 0.552 / -0.390-0.186 / -0.404-0.000 / 0.000
0.619 / -0.460 / 1.2181.321 / 0.442-0.000 / -0.000
0.353 / 0.362 / -0.411-0.190 / -0.4080.000 / 0.000
0.591 / -0.307 / -0.1330.289 / -0.443-0.000 / 0.000
0.896 / 0.321 / -0.776-0.091 / -1.055-0.000 / 0.000
-0.867 / 0.334 / -0.484-1.044 / 0.433-0.000 / 0.000
1.221 / 0.485 / -0.2130.505 / -0.8980.000 / -0.000
-0.724 / -0.881 / 0.503-0.012 / 0.908-0.000 / 0.000
-0.069 / 0.027 / -1.091-0.906 / -0.585-0.000 / 0.000
-0.367 / -0.922 / -0.999-0.866 / -0.3760.000 / 0.000
0.669 / -0.896 / 1.1871.409 / 0.3520.000 / 0.000
-0.875 / -0.773 / -0.466-0.838 / 0.369-0.000 / -0.000
0.097 / -0.039 / 0.7670.572 / 0.549-0.000 / -0.000
-0.858 / -0.713 / -0.505-0.866 / 0.334-0.000 / -0.000
-0.891 / 0.580 / 0.222-0.588 / 0.947-0.000 / -0.000
0.110 / 0.536 / -0.481-0.433 / -0.2650.000 / -0.000
0.838 / -0.181 / 1.0541.296 / 0.1920.000 / 0.000
1.032 / -0.381 / 0.8301.296 / -0.1170.000 / -0.000
0.304 / 0.111 / 0.6780.617 / 0.3490.000 / 0.000
0.135 / -0.766 / 0.7560.719 / 0.4590.000 / 0.000
-0.590 / 0.586 / -0.855-1.177 / -0.0030.000 / 0.000
-0.302 / 0.075 / 0.7660.288 / 0.848-0.000 / 0.000
-0.806 / 0.244 / -0.604-1.074 / 0.300-0.000 / 0.000
0.499 / 0.852 / 0.5010.484 / 0.141-0.000 / 0.000
-0.673 / 0.858 / 0.556-0.250 / 1.0360.000 / -0.000
-0.748 / 0.106 / -0.689-1.074 / 0.1900.000 / -0.000
-0.057 / -0.423 / -1.093-0.819 / -0.629-0.000 / 0.000
1.199 / -0.215 / -0.2890.559 / -0.986-0.000 / -0.000
-0.485 / -0.204 / 0.6940.165 / 0.9120.000 / -0.000
0.494 / -0.754 / -0.2940.187 / -0.5140.000 / -0.000
-0.045 / 0.350 / 0.7900.426 / 0.6970.000 / -0.000
0.241 / 0.191 / -0.460-0.270 / -0.3720.000 / -0.000
0.320 / -0.552 / -0.429-0.063 / -0.4640.000 / 0.000
0.609 / 0.059 / -0.0830.272 / -0.395-0.000 / -0.000
-0.774 / 0.348 / -0.653-1.108 / 0.251-0.000 / 0.000
0.620 / -0.965 / -0.0420.492 / -0.4510.000 / 0.000
0.022 / 0.851 / -1.101-1.000 / -0.598-0.000 / 0.000
0.086 / 0.693 / -0.481-0.477 / -0.2360.000 / -0.000
-0.947 / 0.283 / -0.055-0.774 / 0.778-0.000 / 0.000
0.153 / 0.836 / -0.478-0.456 / -0.272-0.000 / -0.000
0.531 / -0.274 / -0.2460.161 / -0.473-0.000 / -0.000
-0.787 / -0.179 / -0.633-1.008 / 0.235-0.000 / -0.000
-0.908 / -0.781 / -0.371-0.790 / 0.456-0.000 / 0.000
0.026 / 0.839 / 1.4120.840 / 1.1030.000 / -0.000
-0.500 / -0.268 / -0.924-1.015 / -0.1790.000 / -0.000
0.452 / -0.205 / 0.5560.683 / 0.1340.000 / -0.000
-0.264 / -0.936 / 0.7740.499 / 0.751-0.000 / 0.000
-0.910 / -0.931 / 0.164-0.374 / 0.8100.000 / 0.000
0.623 / -0.741 / -0.0280.464 / -0.4270.000 / -0.000
-0.836 / -0.365 / -0.550-0.947 / 0.3130.000 / 0.000
-0.936 / 0.631 / 0.051-0.751 / 0.8680.000 / -0.000
1.169 / 0.105 / 0.5751.113 / -0.3540.000 / 0.000
1.253 / -0.865 / 0.2381.096 / -0.716-0.000 / -0.000
-0.781 / -0.408 / -0.643-0.970 / 0.207-0.000 / 0.000
1.015 / -0.829 / 0.8541.382 / -0.122-0.000 / 0.000
0.066 / 0.009 / -1.104-0.823 / -0.6940.000 / -0.000
0.525 / -0.552 / 0.4650.725 / -0.007-0.000 / -0.000
-0.779 / -0.777 / 0.434-0.117 / 0.9090.000 / 0.000
0.242 / -0.567 / -0.460-0.134 / -0.4280.000 / -0.000
0.565 / 0.177 / 0.3950.571 / -0.029-0.000 / 0.000
1.144 / -0.487 / 0.6321.244 / -0.341-0.000 / 0.000
0.634 / -0.309 / 0.0480.449 / -0.352-0.000 / 0.000
0.446 / -0.133 / 1.3071.213 / 0.6530.000 / 0.000
0.626 / -0.410 / -0.0110.419 / -0.393-0.000 / 0.000
0.314 / 0.562 / -0.432-0.267 / -0.3790.000 / -0.000
0.494 / -0.743 / 1.2851.338 / 0.558-0.000 / 0.000
0.355 / 0.341 / -0.410-0.185 / -0.410-0.000 / -0.000
What survives the reduction?

Try a tilted plane: PCA can preserve its two-dimensional structure almost exactly. A Swiss roll has a curved surface: Isomap uses paths through neighbors to try to unfold it. Too many graph neighbors shortcut the folds; too few can disconnect the graph. Classical MDS fits Euclidean distances and is equivalent to PCA here, up to rotation and reflection. Compare their neighborhood scores, then try t-SNE. Its island sizes and distances between islands do not reliably represent the original geometry. Neighborhood retention is the average overlap of 8-neighbor sets, not an overall quality score.

Source / Manifold learning
How t-SNE moves the points

Perplexity sets a target neighborhood scale. This small exact t-SNE implementation uses symmetric Gaussian affinities in 3D and Student-t affinities in 2D, gradient descent with momentum, a fixed learning rate of 10, and seeded random initialization. The KL value uses the unexaggerated objective, so it need not decrease during warm-up. These are synthetic 3D-to-2D studies; real high-dimensional datasets and UMAP are not included.

Source / Original t-SNE paper