Machine Learning (12): Two viewpoints of the recommendation system _ Machine learning

Source: Internet
Author: User
Tags abstract
1. From the point of view of physical meaning

What is the recommendation system. For example, for a movie, we predict a user's score on a movie.

We use the symbols shown above to denote. It is worth noting that it is possible that the user did not rate a film, at this time R (i,j) = 0.

Here you need to sort out:
For a movie, we need to find some feature space X to measure this movie;
For a user, we need to find some parameter H (x) =wtx to predict the user's rating of the film.
The problem is that we have neither X nor the WI for user I, which means both need learning.

Use the following symbols:

We assume that the eigenvector of the film has been determined, that is, all x (i) is known to learn Theta (j):

Now, in retrospect, we know nothing about the feature vectors of the movie. If all Theta (j) is assumed to be known, learn X (i):

This process is similar to the K-means training process, given an initial theta, and then start training: θ0→x0→θ1→x1 .... →

This is different from K-means because K-means is the Combination-number optimization problem, and our optimization problem here is simple and can be done simultaneously:

Now we're going to look at the given Y data again:

Still a little bit of a problem, if a user does not give any rating for any movie:

According to our learning process: The first item of the cost function is 0. If you want to minimize the cost function, then this user's θ=0, that is to say: For any movie, we will predict its rating as 0--do not recommend any film to the user. Can you do that? Yes, but not very well. We should recommend a movie to any user. How to recommend.
If most people think the film is good, then the movie may be really good. --you'll find a mean for all the scores on a movie.
You can use the mean normalization process as follows:

With y−μ to learn, the final prediction is the result of θtx+μ. 2. From the perspective of abstract calculation

What are the data we have for the film recommendation system? Assuming that the Nu user, NM movie, R (i,j) indicates whether user J gives the user the I score, the corresponding score is Y (i,j). Then our information is (x (j) =j,y=y (I,j)) or (X (j) =j,y= (Y (1,j)),...,?,... y (nm,j)) T). (after all, our referral system is user-centric, not movie-centric-and, of course, movie-centric, the data can be parsed in the same way).

We know that the input x represents the user ID, and there is no real meaning, which we call abstract features.
We're going to design a feature-conversion function, φ, to convert the abstract feature--this function specifically what we don't care about (this is similar to an automatic encoder). Then we learn a predictive function h, which makes H (Φ (x)) ≈y.
The automatic encoder uses a linear model, assuming that the predictive function is also a linear model, then the whole model is a two-layer network.

Assuming x is binary vector encoding, then the network is the NU−D−NM structure

Where vd∗nu,wnm∗d, there is h (x) =wvx
According to the cost function, we know we're looking for w,v to make Y≈VTWT

The alternating optimization technique is then used to solve the optimization problem.

3. Summary

In any case, the length of the feature vector of the movie still needs to be specified by ourselves.

During the training process, we can consider practical issues to customize the solution, such as the more recent time period data, the greater the weight.

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.