Bayesian Personalized Ranking is a learning algorithm for collaborative filtering first introduced in: BPR: Bayesian Personalized Ranking from Implicit Feedback. Steffen Rendle, Christoph Freudenthaler, Zeno Gantner and Lars Schmidt-Thieme, Proc. UAI 2009.
This is a simple Python implementation of BPR for matrix factorization based on the C# one provided by the original authors in MyMediaLite, see http://www.mymedialite.net. I've also implemented a BPR version of SLIM: Sparse Linear Methods for Top-N Recommender Systems. Xia Ning and George Karypis, Proc. ACM RecSys 2012.