erdogant / pca

pca: A Python Package for Principal Component Analysis.
https://erdogant.github.io/pca
MIT License
284 stars 42 forks source link

Cumulative explained variance plot (Scree plot) starting from 0 instead of 1 #1

Closed camilogarciabotero closed 4 years ago

camilogarciabotero commented 4 years ago

Hi @erdogant,

I have been looking for a while for a good Python library that makes all PCA plots beautiful and I think your package achieves this goal by far.

On the other hand while using your package I noticed that the Explained variance plot is starting from 0 (like normal Python indexes) and because of that I think it might be erasing the "last component" when generating the plot, moreover the "0" component is always starting from 0 which is not the common case for the Scree plot:

Screen Shot 2020-04-28 at 5 21 37 PM

If I wasn't clear enough with the issue, I'll be glad to answer your questions. Cheers, Camilo.

erdogant commented 4 years ago

Thanks Camilo! Yes, totally.

erdogant commented 4 years ago

I provided a fix for the plot. Please update with: pip install -U pca