EM-based HMM parameter estimation with forward-backward probabilities
Compute alpha (forward) and beta (backward) probabilities. These give the probability of being in each state at each time step.
Update transition (A) and emission (B) probabilities using expected counts from gamma and xi statistics.