The simplicity of the nearest neighbors algorithm is a double-edged sword. On the one hand, it is easier to grasp, but on the other hand, it lacks an objective function that we can optimize during training. This also means that the majority of its computation is performed during prediction time. To overcome these problems, Yehuda Koren formulated the recommendation problem in terms of an optimization task. Still, for each user-item pair, we need to estimate a rating (ru,i). The expected rating this time is the summation of the following triplet:
- : The overall average rating given by all users to all items
- bu: A term for how the user (u) deviates from the overall average rating
- bi: A term for how the item (i) deviates from the average rating
Here is the formula for the expected ratings:
For each user-item pair in our training set, we know its actual rating (ru...