简体   繁体   中英

PCA : same explained variance ratio for different number of components

I'm trying to understand PCA. I have a 3-dimensional dataset, I built two PCA models, one with 2 components, and the other with 3 components. However, I don't understand why the explained variances ratio for both PCA models is the same.

Model with 2 components: [ 0.60792494  0.31234679]
Model with 3 components: [ 0.60792494  0.31234679  0.07972828]

If the data you are using is the same for both models, then were you to use all possible components, the explained variance ratio should sum to 1. In your instance, the first two components explain ~91% of the variation. Because each PCA component is orthogonal to the previous ones, any additional components you add will explain only the variance that has not yet been explained. Thus, the first 2 components of the 3 component model will explain the same amount as the 2 component model and the 3rd component will explain an additional 8% of variation.

You're using python, perhaps a good intuitive introduction and examples could be found in http://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM