Supervised Matrix Factorization Algorithm