Closed toth12 closed 4 years ago
You can propagate a state probability vector using the msm api, starting with [0, 1, 0]
representing state B.
import numpy as np
import pyemma
# this is your transition matrix
P = np.array([[.4, .3, .3], [.5, 0., .5], [0, .1, .9]])
# create markov state model
msm = pyemma.msm.markov_model(P)
# see how probabilities shift after some steps for state B
for n_steps in range(10):
print(f"After {n_steps} steps: {msm.propagate([0, 1., 0], n_steps)}")
thanks, @clonker sorry for the delayed acknowledgement
Not a problem, you are welcome!
Hi, I am writing to ask how I could use Pyemma for Random Walks. Say I have a state space with A,B,C and I would like to find the most likely state or states where we will be if we start from B after three steps?
Cheers,
Gabor