erdogant / pca

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

Feature: Add loadings scale on secondary axes #4

Closed Rendiere closed 3 years ago

Rendiere commented 4 years ago

When visualising bi-plots, it's often useful to interpret the loadings placed on each feature in order to make deductions such as "principle component 1 places approximately double the loading on features A,B & C than it places on feature D".

Without the scale of the loading vectors in each principle component direction explicitly known however, this can lead to misleading deductions.

This feature request is thus to add the loading scales to each principle component axis.

Example of biplot with loading scales shown:

image

erdogant commented 4 years ago

I agree and added the loading information to the plot. update with:

pip install -U pca The new version should be >= 1.0.8

import pca
print(pca.__version__)