Research Article
A Differential Privacy Framework for Collaborative Filtering
Algorithm 1
The perturbed Pcc (or Cos) algorithm.
Input: the rating matrix, the privacy budget , the parameter k | Output: the predicted scores | . | 2. simMat = similarity (activeMatTrain, otherMatTrain) | 3. simMat = simMat + Lap | 4. otherAvgVec = mean () + Lap | 5. otherMatPred = otherMatPred - otherMatAvg | 6. for each active user j | 7.activeAvg = mean (activeMatTrain (j)) + Lap | // The spdiags function transforms the similarity vector of user j into a diagonal matrix. | 8.activeMatPred (j) = sum (spdiags (simMat (j))otherMatPred) + activeAvg | 9. end for | 10. return activeMatPred |
|