title: What's difference between item-based and content-based collaborative filtering?
body: <p>I am puzzled about what the item-based recommendation is, as described in the book "<a href="https://www.manning.com/books/mahout-in-action" rel="noreferrer">Mahout in Action</a>". There is the algorithm in the book:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>How can I calculate the similarity between items? If using the content, isn't it a content-based recommendation? </p>