What is the fewest number of components that keeps at least 90% of the variance?
pca.explained_variance_ratio_ # [0.62, 0.21, 0.09, 0.05, 0.03]
- 3
- 2
- 4
- 5
Cumulative variance is 0.62, 0.83, then 0.92, so three components reach 90%.
Play AI & ML ▸
pca.explained_variance_ratio_ # [0.62, 0.21, 0.09, 0.05, 0.03]