We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
import os from pylab import * from numpy import * # get the probabilities of going from one state to another. data = loadtxt("mat.txt") data = data.reshape(-1,26) # chop off the last row and column # transition probabilities among the transient states Q = data[0:25,0:25] # the transition probabilities from transient to absorbing R = data[0:25,25:26] #print R # M = (I-Q)^-1 Matrix = linalg.inv(eye(25)-Q) # B = M*R B = Matrix*R #print B count =  for i in Matrix: sum =0 for m in i: sum = sum + m count.append(sum)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.