Recommended systems (Recommender system) problem formulation:
Recommendersystems: Why it has two reasons: first it is a very important machine learning application direction, in many companies occupy an important role, such as Amazon and other sites are very good to establish a recommendation system to promote the sale of goods. Secondly, the system has some big idea in machine learning, learning the big idea in machine learning by learning recommendation system. Then describe an example of a film rating (the entire blog will be rated as an example of a movie).
Movie rating has 5 levels, Mark is not know the information, the recommendation system needs to do is to predict the known data mark the data is what. Intuitively we can split the block to find Alice Bob in favor of love movies, and the back of the two to see action movies, these are relatively straightforward information on the data acquisition (this is the case of the known eigenvectors). There is also a need to note that the formal description of the entire course is based on this.
Exercise: is to let everyone familiar with Ng on the film rating of each variable parameter representation.
Content Based Recommendations:
Let's take a look at the process of unrated movie predictions:
On the right can see that we have all the movies through the Romance action two features to describe, we are the blank position prediction method of thinking is: For each user we learn the parameters (how to learn this parameter), and then by the parameter vector and feature vector product value to judge.
Exercises:
The above problem only needs to take the parameter vector to multiply with the eigenvector and the known data to compare, fits the fitting to be established.
A formal description of the problem:
How to learn the parameter vectors, using the linear regression method.
The objective function is:
Because M (j) is a constant to simplify the objective function:
The above formula is the first one that describes a user, and the following formula sums all the users so that the objective function is minimized. In this case, the minimum value of the objective function is similar to the method in linear regression, gradient descent method:
Summary: This algorithm assumes that we already have features, and we know what features a movie can use to describe it. But there are a lot of movies that we may not be able to describe with eigenvectors, and the following methods solve the problems mentioned here.
Collaborative Filtering:
Here the problem conditions change, we are not able to get the movie feature description, but we can get different user to different movie hobby is also theta parameter vector.
Exercise: The theta vector is known to find eigenvalues.
Objective functions that need to be optimized:
Exercise: Iterative solution by gradient descent method.
The following is a formal description of collaborative filtering real collaborative filtering is more complex than this, here is just the first line of conceptual cognition.
Before we mentioned two methods: the first is to always characterize the feature set, then estimate Theta, and the second is to always theta to estimate the feature set. We can cross-use these two methods to better estimate features and theta parameters. The computational performance here is not high and the computational optimization of the problem is discussed.
Collaborativefiltering algorithm:
We can iteratively optimize the theta and eigenvectors, but this performance is relatively low, so now consider improving the performance of the algorithm. At the same time, two kinds of methods are solved.
is to combine the two method optimization functions to get the overall objective function.
Algorithm Flowchart:
Exercises:
Vectorization Low Rank matrix factorization:
The main thing here is to construct predicted ratings matrix by multiplying two vectors.
Exercises:
One of the great conveniences of vectorization is the recommendation to find similar movies or sites recommending similar items. We only need to calculate the distance between the eigenvectors of the two items, the smaller the distance, the more similar things must be.
Implementationaldetail:mean Normalization
We added a new user Eve, through the above-mentioned calculation of Theta and movie ratings, which we sent down as:
We found out that Eve scored 0 for all movies, which is obviously inappropriate and now needs to be addressed.
We said above that when a user does not have any ratings for a movie, it is difficult to deal with it, using the preceding algorithm to get 0. Now we improve the methods such as:
When the product of Theta and X (i) is 0, but with the mean value so the user like Eve does not set his rating to 0.
You can preprocess the data with mean normalization. This may result in some improvements in the algorithm.
Exercises:
Stanford ng Machine Learning Lecture Notes-Referral system (Recommender systems)