Created
August 5, 2017 06:30
-
-
Save infinite-Joy/45786d8088bed50c9b088ffccb6218fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mapping eigen value to eigen vector | |
eigen_pairs = [(np.abs(eigen_vals[i]), eigen_vecs[:,i]) for i in range(len(eigen_vals))] | |
# Sort the (eigenvalue, eigenvector) tuples from high to low | |
eigen_pairs.sort() | |
eigen_pairs.reverse() | |
# check if the value is decreasing | |
print([e[0] for e in eigen_pairs]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment