Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- #here is the sequence that I need to look up in the transition matrix
- sequence = [0, 1, 0, 1, 1]
- #the transition matrix that gives the probability to change between each
- of the states
- transition_matrix = np.array([[0.2, 0.8], [0.6, 0.4]])
- #desired output
- result = [0.8, 0.6, 0.8, 0.4]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement