"Turn" from the movie recommendation to the collaborative filtering algorithm to ensure everyone can understand

movie 328℃
Programmers in the

engineering architecture direction are more or less timid when seeing algorithm-related technologies such as recommendation/search/advertising. But after careful study, I found that it is not so difficult.

Today’s 1-minute series, I will introduce you to the "collaborative filtering" in the recommendation system. There is absolutely no formula, so everyone can understand.

What is Collaborative Filtering?

Answer

: By finding groups with similar interests or common experiences, we recommend information of interest to users. For example,

, how to use collaborative filtering to recommend movies to user A?

Answer

: The brief steps are as follows:

find the hobbies of user A (user_id_1)

find the set of user groups that have the same movie hobbies as user A (user_id_1) Set

find the set of movies that the group likes Set

recommend these movies Set to users What are the specific implementation steps of A(user_id_1)

?

Answer

: The brief steps are as follows:

(1) Draw a big table,

abscissa

is all movie_id,

ordinate

all user_id,

cross

represents this user likes this movie

z47

zz as above horizontal table: Coordinates, assuming there are 10w movies, so the abscissa has 10w movie_ids, the data comes from the

database

the ordinate, assuming there are 100w users, so the ordinate has 100w user_ids, and the data also comes from the intersection of

database

, "1 "Means that the user likes the movie. The data comes from the

log

voice-over: What is "like" needs to be artificially defined, such as browsed, searched, and liked. Anyway, there are these data in the log

(2) find user A( User_id_1)’s hobbies

'Turn' from the movie recommendation to the collaborative filtering algorithm to ensure everyone can understand - Lujuba

are as shown in the table above, you can see that user A likes movies {m1, m2, m3}

(3) find the user group set Set

'Turn' from the movie recommendation to the collaborative filtering algorithm to ensure everyone can understand - Lujuba

that has the same movie hobbies as user A (user_id_1) as shown in the table above, you can see So, users who like {m1, m2, m3}, in addition to u1, there are {u2, u3}

(4) find the group’s favorite movie collection Set

as shown in the table above, in the user group with the same preferences {u2, u3} , And the favorite movie collection is {m4, m5}

voice-over: "Synergy" is reflected here.

(5) When user A (use_id_1) visits the website in the future, he must recommend the movie {m4, m5} to him. The general principle of

collaborative filtering is as above, and I hope everyone can gain something.

Tags: movie