Guaranteed And Efficient Learning Algorithms For Ranking And Matrix Factorization