I am a python rookie, these days I was learning PCA decomposition, when I use the explained_variance_ratio_ I found that the results are sorted by default by default like these:
Ratio: [9.99067005e-01 8.40367350e-04 4.97276068e-05 2.46358647e-05
1.00120681e-05 8.25213366e-06]
This is my previous operation:
from sklearn.decomposition import PCA
my_pca = PCA(n_components=7)
new_df = df.drop(labels=["salary","department","left"],axis=1)
low_mat = my_pca.fit_transform(new_df)
print("Ratio:",my_pca.explained_variance_ratio_)
I was so confused which was the most important components, so I want to know do you have some ways to let the composition and ratio one-to-one correspondence, like this:
Ratio: satisfaction_level 9.99067005e-01
......
thank you!