Collaborative Filtering recommendation algorithm

Source: Internet
Author: User
Tags square root

Collaborative filtering enables recommendations by comparing users to other users and data.

We do not use the important attributes given by the experts to describe the objects to calculate their similarity, but instead use the user's opinion to calculate the similarity, which is the method used in the collaborative filtering. It does not care about the description attribute of the item, but rather strictly calculates the similarity according to many users ' opinions.

The similarity measure is a European distance, one is Pearson correlation coefficient, the other is the cosine similarity.

The Pearson correlation coefficients range from 1 to +1, and we use the 0.5+0.5*CORRCOEF () function to calculate the value range normalized to between 0 and 1.

The cosine similarity is the cosine that calculates the angle of the two vectors. If the angle is 90 degrees, the similarity is 0, and if the two vectors are in the same direction, the similarity is 1.0. As with Pearson correlation coefficients, the range of cosine similarity is also between 1 and + 1. So we can also get it normalized to between 0 and 1.

The time based on the calculation of item similarity will increase with the increase of the number of items, and the time complexity based on the user's similarity will increase with the increase of the number of users.

The evaluation index of the recommended engine system is an indicator called the minimum RMS error (RMSE), which first calculates the mean square error and then takes its square root.

The working process of the recommender system is: Given a user, the system will return n the best recommended dish for this user. To achieve this, we need to:

(1) Looking for a user without rating the dishes, that is, in the user-five Oh I you matrix 0 value

(2) In all items not rated by the user, a possible rating score is expected for each item, that is to say, we think the user may rate the item (this is our intention to calculate the similarity);

(3) Ranking these items from high to low, returning the first n items

Collaborative Filtering recommendation algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.