Skip to content

A collaborative filtering algorithm

Mateus de Assis Silva edited this page Jun 1, 2020 · 2 revisions

The steps to estimate the rating are:

  1. Define active user (subscript a) and his/her movie (subscript j) to be rated.
  2. Initiate estimation as the mean of active user votes
  3. Get all users' ID from the training set
  4. For each user, do:
    • Get his/her votes (set of logs)
    • If he/she voted in the movie defined above, do:
      • Get Movies both users (active one and training one) voted in and, if this set is not empty:
        • calculate w(a,i) and the difference between the user vote on the iterating movie and his/her average.
  5. If there is correlations:
    • Compute normalizing factor k.
  6. If there are correlations and differences:
    • Add weighting factor to the estimate of active user rate on movie.
  7. Return estimation