Item based and user based recommendation difference in Mahout
Item Based Algorithm

for every item i that u has no preference for yet

  for every item j that u has a preference for

    compute a similarity s between i and j

    add u's preference for j, weighted by s, to a running average

 return the top items, ranked by weighted average


User Based Algorithm

for every item i that u has no preference for yet

 for every other user v that has a preference for i

   compute a similarity s between u and v

   add v's preference for i, weighted by s, to a running average

 return the top items, ranked by weighted average


Item vs User based:

1) Recommenders scale with the number of items or users they must deal with, so there are scenarios in which each type can perform better than the other

2) Similarity estimates between items are more likely to converge over time than similarities between users

3) We can compute and cache similarities that converge, which can give item based recommenders a performance advantage

4) Item based recommenders begin with a list of a user's preferred items and therefore do not need a nearest item neighborhood as user based recommenders do