Determine the Number of States in Hidden Markov Models via Marginal Likelihood (Journal of Machine Learning Research, 2026)