How do you choose number of components in PCA?
Updated May 16, 2026
Short answer
By analyzing explained variance ratio and selecting components that retain desired variance.
Deep explanation
A cumulative variance plot (scree plot) helps determine optimal number of components, often targeting 90–99% variance retention.
Real-world example
Choosing components for reducing image dataset dimensionality.
Common mistakes
- Choosing components arbitrarily.
Follow-up questions
- What is a scree plot?
- Can too many components hurt performance?