in this paper, the author mainly introduces the basic principles of the common recommendation algorithm.
0., from the cosine formula,
, first think about a question. How do we quantify the similarity between the two things? Of course, this is also the problem that recommender systems need to face many times.
we know that the concept of vectors can be visually represented as line segments with arrows. The method of two-dimensional space vector representation is a vector of multidimensional space vectors, which is a good model for describing things.
, for example, assumes that the user has 5 dimensions:
‘s liking for clothes (1~5 points)
‘s liking for home (1~5 points)
‘s liking for 3C (1~5 points)
‘s love of books (1~5 points)
‘s liking for cosmetics (1~5 points)
a user A: 3 of the degree of liking for clothing, the degree of love for home 1, the degree of love for 3C 4, 5 of the degree of enjoyment of the book, 0 of the degree of love for cosmetics, the user A can be expressed as
a user B: 3 of the degree of liking for clothing, the degree of love for home 4, the degree of love for 3C 5, 0 of the degree of enjoyment of the book, 2 of the degree of love for cosmetics, the user B can be expressed as
, how big is the similarity between the two users? Now that we represent the two users as vectors, we can consider how vectors measure similarity. That’s right. Look at the angle between these two vectors. The smaller the angle is, the greater the similarity is.
for vectors, and their angles in multidimensional space can be computed by vector cosine formula:
The value of the
cosine similarity itself is a 0~1 value, 0 represents complete orthogonality, and 1 represents exactly the same. As far as the example of user A and user B is concerned, we can see that their similarity is:
cosine formula itself has a wide range of applications. Quantitative similarity is a common problem in search recommendation and business strategy. Cosine formula is a good solution. As far as recommendation is concerned, the similarity of content is calculated, the similarity of users is calculated, the similarity of user types is calculated, and the similarity of content types is calculated. These are the scenarios that can be applied.
What is the essence of
recommendation and search have similarities in nature. Search for users to quickly find their own interesting content from the mass of data needs, belonging to the user active access. Recommendation is the system from the mass of data in accordance with the obtained user data, guess the user’s interest in the content, and recommended to the user, is recommended to the user system. Essentially, in order to help users find what they are interested in in this age of information overload