Algorithm 1.
1: | Input: data O = (o0, …, oV ) and T = (t0, …, tV ), state set S, edge set L, initial guess of Q |
2: | Output: transition rate matrix Q = (qij) |
3: | Find all distinct time intervals tΔ, Δ = 1, …, r, from T |
4: | Compute P(tΔ) = eQtΔ for each tΔ |
5: | repeat |
6: | Compute p(v, k, l) = p(s(tv) = k, s(tv+1) = l∣O, T,Q) for all v, and the complete/state- optimized data likelihood l by using Forward-Backward (soft) or Viterbi (hard) |
7: | Create soft count table C(Δ, k, l) from p(v, k, l) by summing prob. from visits of same tΔ |
8: | Use Expm, Unif or Eigen method to compute and |
9: | Update , and qii = −Σi≠j qij |
10: | until likelihood l converges |