Do training and testing with matrix factorisation.