Finding stationary distribution of a huge Markov Chain

144 views Asked by At

(Updated)

I need to find stationary distribution of a huge Markov Chain. My state vector is (t,x_1,x_2,x_3,x_4,x_5) where t=1,...,7 and each of x_j=0,...,40. As you can see, the size of transition matrix is huge.

I'm trying to solve P=PxA where P is row vector is stationary distributions, and A is the transition probability matrix. To solve this I use numerical methods such as Gauss-Seidel method. In summary, I start from an initial answer, then for iteration n+1, I use stationary distribution of iteration n as input; hence,

P_(n+1)=P_nxA

(plus normalization to 1)

I can calculate each member of A very easily and quickly; so I do not really need to store huge transition matrix in memory; however, I need to store P_n, which is a vector of 130 million elements.

I am trying to code it in Python and was wondering if there is any suggestion regarding "efficient" storing of these values in Python.

0

There are 0 answers