[Recommendation System]--Collaborative Filtering Algorithm

Collaborative filtering

Collaborative filtering mainly includes user-based collaborative filtering and commodity-based collaborative filtering

1. User-based collaborative filtering

a. Find other users closest to the user, find items they have watched/bought but the current user has not watched/bought, and score according to the distance weighted.
b. Find the items with the highest score to recommend

2. Item-based collaborative filtering

According to the user's behavior on the product/content, the similarity between items is calculated, and the closest item to the current item is found for recommendation.

3. Similarity/Distance Metrics
  • Euclidean distance
    D 1 , 2 = ( x 1 x 2 ) 2 + ( and 1 and 2 ) 2
  • Jaccard similarity
    J ( A , B ) = | A B | A B |

    Narrow Jaccard similarity, calculate the similarity between two sets, the "value" of the element is 0 or 1
  • cosine similarity
    c O s ( θ ) = a T b | a | · | b |
  • Pearson similarity

Guess you like

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