This code doesn't implement the regularization on the feature transformation matrix. Should be an easy addition though.