The Baum-Welch algorithm (expectation maximization)