Principal component analysis can be viewed as a one-layer neural network with M neurons. X has no label (Label). (autoencoder)
PCA approach
Essence: Find the direction that maximizes the variance and project in that direction. (The direction of maximum variance refers to the maximum variance after projection, because if the points are gathered together after projection, they can be approximated into one point and cannot be distinguished)
When M=1
Suppose there are p x training samples in total
Transform Y:
normalize a1
When M>1
PCA algorithm
To find the eigenvalue, you can use the SVD algorithm (Singular Value Decomposition) to quickly find it.