first version of matrix factorization with factor graphs and stochastic factors.