Project on preference learning - ENSAE ParisTech
This project is based on the article Preference Learning with Gaussian Processes (Wei Chu and Zoubin Ghahramani, 2005)
(link here).
The main contribution of this artice was to propose a full non-parametric approach to tackle problems such as : Instance Ranking,
Label classification and Label ranking. We propose here an implementation of the algorithms in the paper, different algorithms to
compare their performance on the learning task, and finally an application to solve the widely studied Cold-Start
problem in a movie recommender system.
Our code is divided into 4 types of files :
So there are three ways to directly test our algorithms :
We provide below a more detailed description of the files containing the algorithms for each of the three problems.
We define the problem as in the original article: different instances (represented as features vectors of size d) are available. We
want to know if an agent prefers an instance a over an instance b, but the only information we have about him is a set of m
observed preferences.
Our class learning_instance_preference takes as input the design matrix of the instances and the set of observed preference, and follows the steps desrcibed in the article to compute the maximum a posteriori of the function f over the available instances.
Then this result is used to predict the value of f and perform pairwise comparison for any other set of instances.
To compare this algorithm we also implemented two benchmark algorithms. These are adaptations from articles from Herbrich et al. and Har-Peled et al. (constraint classification). They mainly rely on the translation of preferences into vectors such that one can handle the problem as a classification problem. It is performed inside our classes SVM_InstancePref and CCSVM_IL.
Results are tested using a simple accuracy score : we compare random pairs of instances and check the percentage of pairs that
are correctly predicted (instances can be drawn from the train set or any test set depending on what we want to check).
This problem is slightly different from the previous one : now there are multiple agents, and for each of them an incomplete preference
graph on the same L different instances. The idea here is to complete the preference graph for each agent, and to be able to predict the
preference graph of any new agent. We may expect two different kinds of performance from our algorithm :
The class learning_label_preference takes as inputs the design matrix of the agent features and the list of the observed preference graphs
(a preference graph being simply represented as the list of the preferences that form the edges). Considering this, the code is organized
exactly as the one for instance learning since the two algorithms are very similar.
Again, the constraint-classification SVM algorithm from Har-Peled et al. is used to benchmark this algorithm. The implementation of this algorithm is done in our class CCSVM_LL.
The classification problem is again tested using the accuracy. For the ranking problem, we consider that the algorithm is
wrong if the observed graph for a given agent is not consistent with the prediction (i.e if any edge is in the wrong direction).
For this part we used the MovieLens database to build a user-movie matrix M where M(i,j) is the rating of the movie j given by user i.
Then a low-rank matrix factorization has been used to decompose this matrix in $M=UV^T$ (explained in the guidelines here), where U is a
matrix containing user’s features and V a matrix containing movie’s features. So the rating M(i,j) is just the scalar product between u(i)
and v(j).
We considered the cold start problem where a new user joins the platform and we need to learn his preferences. We used the Instance
Preference Learning for this problem : we do not observe u but we have the complete instance matrix V, and we solve this problem sequentially as:
New movies are added at each step from the original pool to keep the same size for the set of instances. To avoid too long computation time
we stop the update of f after an adaptation period. To compare our results with other algorithms, we considered a solution for this problem
using the Linear Bandit Framework (again from the guidelines here).
For this problem both implementation and experiments are available in movie_suggestion.py.