Neighborhood-based algorithm is the most common CF collaborative filtering algorithm. User-based CF and item-based item based CF are divided.
1.user based CF
to the target user U, find a similar user set U, the user interested in U and you have not seen the items recommended to U.
User similarity, calculated by representing the user as a vector of the commodity.
If 22 users are calculating the similarity, then the computational complexity is O (| u|^2), and for each u, its vectors are sparse. This means that many users do not intersect, and the similarity is calculated as 0. Therefore, you can filter out these user groups before the calculation. One method is to create an item to the user's inverted list, for each item under the user lists, 22 combinations as key,key each appear once plus one, so that each existence of the intersection of the user combination of similarity molecules, and then divided by the denominator to get the similarity.
When a user with similar TOPK is obtained, the interest degree of the target user U to item I is expressed as a linear combination of the similarity between the K users and their interest in U.
An improvement in user interest similarity: Take into account the popularity of the product and punish the hot commodities.
2.item based CF
User-based CF grows with the user, the user relation matrix is too large. Item-based CF recommends items that have an associated (or similar) relationship with items that the user has previously been interested in. The similarity calculation method is obtained by the user's behavior, not the property of the item itself.
That is, the object is represented as the user's vector after calculation. In the same vein as the user based CF, create an inverted list of users-items.
In the same vein, users of certain attributes are punished for correcting the similarity of items.
ITEMCF can improve the accuracy and coverage after normalization of the similarity matrix.
Reference: "Recommended system Practice"
Neighborhood-based recommendation algorithm