Recommendation System - Principle and Implementation (Collaborative Filtering)

Function

Increase product sales
Increase user satisfaction and loyalty
Better understand user needs

Collaborative filtering

Use the past behavior or opinions of the existing user group to predict what the current user is most likely to like or be interested in.

Input: User-item rating matrix
Output : The predicted value of the current user's liking and
disliking the item and a list of n items of recommended items (excluding items that the current user has purchased)

Implementation is
based on the user's nearest neighbors
Premise/Assumption
User 's preferences do not change over time

  1. Input rating dataset and current user ID Find other users who have similar preferences to the current user in the past These users are called peer users or nearest neighbors
    Pearson correlation

  2. For each product p that the current user has not seen, use the user's neighbors to predict the score of the product p, and
    select the most similar N neighbors to calculate the predicted value of the item p
    (N neighbors have the item p rating value)

  3. Select the TopN products with the highest ratings of all products to recommend to the current user

Item-based nearest neighbors
Item similarity calculation:
do not consider the difference between the average user ratings
Generally use the modified cosine similarity formula
to subtract the average from the rating value

Select the most similar top N items and predict user u's rating for item p

item-based nearest neighbors

effect evaluation

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325892245&siteId=291194637