Likelihood framework for choosing the optimal number of states in a markov state model