What is PCA?
Principal Component Analysis (PCA) - this is a technique for dimensionality reduction, which finds principal directions of variation in the data and projects them onto these directions.
PCA Steps:
- 1. Centering data (subtracting the mean)
- 2. Calculation of the covariance matrix
- 3. FINDING EIGENVALUES AND EIGENVECTORS
- 4. Sort by custom values
- 5. Projection onto Principal Components
USE CASE:
- • High-dimensional data visualization
- • Reducing noise in data
- • Accelerate ML algorithms
- • Image compression
100
0.70
2
Original data
After PCA
CUSTOM VALUES
EXPLANATORY VARIATION
METRICS
Total variation:
0.00
SAVED VARIATION:
0.00
Lost variation:
0.00
Correlation PC1-PC2:
0.00
Common questions
By the 80-20 rule: enough components to explain 80% of variation, or the elbow method on the eigenvalues graph.
Yes, but it loses the least important information (noise). PCA retains the maximum variance in the data.
Yes, through the weights of original variables. But interpretation can be difficult for high-dimensional data.
When important interpretation of variables, for nonlinear dependencies, or when all variables need to be saved.
SVD is a more general matrix decomposition method. PCA can be implemented via SVD, but not the other way around.