I create a recommendation engine which finds item similarities according to user ratings. I'm trying to use adjusted cosine similarity to find similarities. I follow these steps.
- Find mean rating of an every item.
- Subtract mean rating from each item rating.
- Apply cosine similarity.
My problem is at the second step. If all users give same rating to an item, subtracting mean rating from each rating creates zero vector. Because this vectors are dividers in cosine similarity, this causes zero division error. So is there a solution for this?