Test learn_dynamics function. Add learn_parameters function to learn transition matrix.