Maximisation step for a training set implemented