Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import numpy as np
  2.  
  3. #here is the sequence that I need to look up in the transition matrix
  4. sequence = [0, 1, 0, 1, 1]
  5.  
  6. #the transition matrix that gives the probability to change between each
  7. of the states
  8. transition_matrix = np.array([[0.2, 0.8], [0.6, 0.4]])
  9.  
  10. #desired output
  11. result = [0.8, 0.6, 0.8, 0.4]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement