markov chain helper methods (training)