For both item-item and user-user collaborative filtering the recommendation matrix $_{m x n}$, which is an (m x n) matrix, can be defined as:$$(i,j)=r_{ij}$$For user-user collaborative recommendation r_ij is defined as$$r_{ij}= _{(x users)}[cosSim(x,i)*R_{xj} ]$$For item-item collaborative recommendation $r_{ij}$ is defined as$$r_{ij}= _{(x  items)}[R_{ix}*cosSim(x,j) ]$$The matrix  can thus be defined as: for user-user filtering: $= S_U * R $for user-user filtering $= R * S_I$In which scenarios does the equation  holds true. Assuming that we need to pick the k items with highest $r_{ij}$ in order to recommend the top-k items for a user i
Recommendation matrix as a product of User Similarity and Ratings
similarity;recommender system;cosine distance