Markov chain stationary distributions with scipy.sparse?

前端 未结 4 1696
挽巷
挽巷 2020-12-16 07:32

I have a Markov chain given as a large sparse scipy matrix A. (I\'ve constructed the matrix in scipy.sparse.dok_matrix format, but con

4条回答
  •  伪装坚强ぢ
    2020-12-16 07:46

    Use power iteration (for example): http://www.google.com/search?q=power%20iteration%20markov%20chain

    Or, you can use the shift-invert mode of scipy.sparse.linalg.eig (which is ARPACK) to look for eigenvalues close to 1. "Specifying" normalization is not necessary, as you can just normalize the values afterward.

提交回复
热议问题