Adding in the training data generation algorithm and the beginnings of the code to generate a shift-invariant EM