Implementing a Rating-Based Item-to-Item Recommender System in PHP/SQL


User personalization and profiling is key to many succesful Web sites. Consider that there is considerable free content on the Web, but comparatively few tools to help us organize or mine such content for specific purposes. One solution is to ask users to rate resources so that they can help each other find better content: we call this rating-based collaborative filtering. This paper presents a database-driven approach to item-to-item collaborative filtering which is both easy to implement and can support a full range of applications.


Item-based Collaborative Filtering, Recommender Systems, e-Commerce


Daniel Lemire, Sean McGrath, Implementing a Rating-Based Item-to-Item Recommender System in PHP/SQL, Technical Report D-01, January 2005.


Hint : It is sometimes necessary to hold down shift while clicking in order to save a document.


This code was found to be useful by several users, but you are expected to be knowledgeable in SQL and PHP to use it.


   author    = {Daniel Lemire and Sean McGrath},
   title     = {Implementing a Rating-Based Item-to-Item Recommender System in PHP/SQL},
   institution = {},
   year      = {2005},
   number ={D-01},
   url = {}


Related work

Please see the Wikipedia entry on Slope One.


This report talks about the implementation of the following paper:

Note that I don't encourage citing this technical report only, please cite the SIAM Data Mining paper also.

Valid XHTML 1.0! Valid CSS!