I have a very large sparse matrix which represents a transition martix in a Markov Chain, i.e. the sum of each row of the matrix equals one and I'm interested in finding the first eigenvalue and its corresponding vector which is smaller than one. I know that the eigenvalues are bounded in the section [-1, 1] and they are all real (non-complex).
I am trying to calculate the values using python's scipy.sparse.eigs
function, however, one of the parameters of the functions is the number of eigenvalues/vectors to estimate and every time I've increased the number of parameters to estimate, the numbers of eigenvalues which are exactly one grew as well.
Needless to say, I am using the which
parameter with the value 'LR'
in order to get the k largest eigenvalues, with k being the number of values to estimate.
Does anyone have an idea how to solve this problem (finding the first eigenvalue smaller than one and its corresponding vector)?
I agree with @pv. If your matrix S
was symmetric, you could see it as a laplacian matrix of the matrix I - S
. The number of connected components of I - S
is the number of zero-eigenvalues of this matrix (i.e, the dimension of the space associated to eigenvalue 1 of S
). You could check the number of connected components of the graph whose similarity matrix is I - S*S'
for a start, e.g. with scipy.sparse.csgraph.connected_components
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With