Bayesian Personalized Ranking

The algorithm addresses the One Class Collaborative Filtering problem (OCCF) by turning it into a ranking problem and implicitly assuming that users prefer items they have already interacted with another time. Instead of applying rating prediction techniques, BPR ranks candidate items for a user without calculating a “virtual” rating.

The overall goal of the algorithm is to find a personalized total ranking \(>_u \subset I^2\) for any user \(u \in Users\) and pairs of items \((i,j) \in I^2\) that meet the properties of a total order (totality, anti-symmetry, transitivity).

The model uses a pair-wise interpretation of the implicit feedback matrix and tries to reconstruct for each user parts of \(>_u\), meaning a user's positive feedback represents a preference of the user over an item that the user did not provide any feedback on. In other words a positive only feedback will be transformed into positive and negative feedback in terms of pairs of items \((i,j)\), where the user prefers i over j (positive) and correspondingly rephrased dislikes j over i(negative).

Given \(\Theta\) the parameter vector of a model (in rrecsys the model is a factorized matrix) to determine the personalized ranking for any \(i \in I\), BPR aims to maximize \(p(\Theta | >_u) \propto p(>_u|\Theta) p(\Theta)\) posterior probabilities. Optimization of \(\Theta\) is achieved through a criterion called BPR-OPT which is related to the AUC metric and optimizes it implicitly. We optimized the parameter \(\Theta\) with gradient descent, by choosing randomly choosing triples \((u,i,j)\) from the training data.

bpr <- rrecsys(smallML, "BPR", k = 10, regU = .0025, regI = .0025, regJ = 0.0025, updateJ = TRUE)
bpr
## The model was trained on the dataset using  BPR algorithm. 
## The algorithm was configured with the following parameters:
##    k lambda   regU   regI   regJ updateJ
## 1 10   0.05 0.0025 0.0025 0.0025    TRUE

k is he number of features, regU the regularization term for user, regI the regularization term for positive item, updateJ a Boolean argument to impose if negative terms must be updated and regJ the regularization term for negative items. The above call is configured to the default values.

The returned object is of type BPRclass.

To get more details about the slots read the reference manual.