简体   繁体   中英

Python routine on matrix diagonalization

Good morning: I have a doubt about the python routine at: https://www.google.com/url?sa=t&source=web&rct=j&url=https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.linalg.eigsh.html&ved=2ahUKEwjJxrid8ezoAhXj6eAKHQbzBCwQFjAAegQIARAB&usg=AOvVaw29YNiM2xotOUio89RVOe_x&cshid=1587038068544

It says that it computers k eigenvectors and eigenvalues, with k smaller than matrix dimension, but is it possible to use it to get the lowest k eigenvalues or are those eigenvalues randomly ordered in the spectrum?

As the documentation you linked states, the keywords which and mode affects which eigenvalues are selected:

*which* : str ['LM' | 'SM' | 'LA' | 'SA' | 'BE']

Which k eigenvectors and eigenvalues to find:
'LM' : Largest (in magnitude) eigenvalues 
'SM' : Smallest (in magnitude) eigenvalues
...

and

*mode* : string ['normal' | 'buckling' | 'cayley']

...
The choice of mode will affect which eigenvalues are selected by the keyword 'which'.

The default of which is 'LM' (largest eigenvalues) so you might want to pass 'SM' to retrieve the lowest.

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