@machinelearningtogo: ➡️ Machine Learning from Scratch, part 34: principal component analysis (PCA). PCA finds the few directions in your data along which the points spread out the most. The first principal component is the direction in which the cloud is widest, the second is the widest direction at a right angle to the first, and so on. Mathematically these directions are the eigenvectors of the data's covariance matrix, and each eigenvalue says how much spread its direction holds. In practice you center the data, compute these directions and project every point onto the first few. Keep those, drop the rest, and you lose little, because the dropped directions barely vary. Our own run, nothing downloaded. pca.py (14 lines of numpy) makes 400 points with 100 numbers each. Behind them sit 3 hidden directions plus noise in all 100 dimensions. It centers the data, builds the 100 by 100 covariance matrix, takes its eigenvectors and keeps the first 3. They hold 92 percent of the spread (52, 31 and 9 percent). Each of the other 97 directions holds 0.2 percent or less. The cloud you see is our real data, projected to 3 numbers per point. Honest notes: our data is made up and has a clean hidden structure on purpose, so 3 components fit well; real data is rarely this tidy. The 3D view is rotated only so you can see it better. PCA only finds straight directions, so curved patterns need other methods, and the direction with the most spread is not always the one that helps a prediction. For pictures of word embeddings, PCA is one common choice next to methods like t-SNE and UMAP. #machinelearning #ai #python #datascience #coding
MachineLearningToGo
Region: DE
Wednesday 14 October 2026 07:06:23 GMT
Music
Download
Comments
Luca :
first person to explain it in under 10 words wins my respect
2026-10-14 16:55:14
3
Take a guess. Prince what :
still missing a "few" data points, good video though
2026-10-14 22:58:11
0
randomahguy_ :
Do PPCA
2026-10-14 08:00:17
0
Kevin :
Phenomenal video
2026-10-14 21:14:54
2
hansfrans40 :
[Rotes Herz][Rotes Herz][Rotes Herz]
2026-10-14 14:57:49
0
To see more videos from user @machinelearningtogo, please go to the Tikwm
homepage.