Social Filtering Recommendation Framework


0.1, February 7th, 2015



The use of this framework requires the following libraries:

  1. GCC 4.7 or above (or equivalent C++11 compiler)
  2. Eigen (
  3. Boost / Program Options (
  4. Python with the packages Numpy, Scipy, Pandas


First verify if all the requirements are met. If not follow the installation procedure for each one.

Secondly, edit the file in the root folder to specify the correct path for the include files (Eigen and Boost) and libraries (Boost). Suppose the Eigen and Boost include files are found in the folder path/to/include and their libraries to path/to/lib. In this case you should change the following lines accordingly:

INCLUDE_FLAGS = -Ipath/to/include 
LIB_FLAGS     = -Lpath/to/lib

Then launch Makefile in the root folder:



Given a list of target individuals (to whom one wishes to recommend) and a list of recommendable items the social filtering method will compute a score for each couple (user,item) and rank them.

First, compute the similarity graph between users (or items) from the ratings matrix using one of the the following metrics:

  • Standard or asymmetric cosine: bin/sim-cosine
  • Jaccard: bin/sim-jaccard
  • Bigrams (association rules of length 2): apriori/

Then, use the similarity graph and the ratings matrix to generate the recommendations ranked by score with the program bin/sf. Program usage and parameters available with the option -?.


  • Daniel BERNARDES (
  • Mamadou DIABY (
  • Françoise FOGELMAN-SOULIÉ (
  • Emmanuel VIENNET (

This work has been done at L2TI (


Copyright (c) 2014, the authors.

Copyrights licensed under the New BSD License. See the accompanying COPYRIGHT file for terms.