码迷,mamicode.com
首页 > 系统相关 > 详细

Machine Learning - XVI. Recommender Systems 推荐系统(Week 9)

时间:2015-04-03 11:29:27      阅读:334      评论:0      收藏:0      [点我收藏+]

标签:machine learning   机器学习   andrew   ng   推荐系统   

http://blog.csdn.net/pipisorry/article/details/44850971

机器学习Machine Learning - Andrew NG courses学习笔记

Recommender Systems 推荐系统

{an important application of machine learning}

Problem Formulation 问题规划

技术分享

Note:

1. to allow 0 to 5 stars as well,because that just makes some of the math come out just nicer.
2. for this example, I have loosely 3 romantic or romantic comedy movies and 2 action movies.
3. to look through the data and look at all the movie ratings that are missing and to try topredict what these values of the question marks should be.



Content Based Recommendations基于内容的推荐

技术分享

Note:

1. add an extra feature interceptor feature X0, which is equal to 1

2. set n to be the number of features, not counting this X zero intercept term so n is equal to two because we have two features x1 and x2

3. to make predictions, we could treat predicting the ratings of each user as aseparate linear regression problem. So specifically lets say that for each user j we are going to learn a parameter vector theta J which would be in r n+1, where n is the number of features,and we‘re going to predict user J as rating movie I, with just the inner product between the parameters vector theta and the features "XI".

4. let‘s say that you know we have somehow already gotten a parameter vector theta 1 for Alice.{线性规划求出:对于Alice评过的每部电影就是一个example,其中example0中x = [0.9 0], y = 5,用梯度下降求出theta}
Optimization algorithm:estimate of parameter vector theta j
技术分享

技术分享技术分享

Note:

1. to simplify the subsequent math,get rid of this term MJ.that‘s just a constant.
2. because our regularization term here regularizes only the values of theta JK for K not equal to zero.wedon‘t regularize theta 0.

3. can also plug them into a more advanced optimization algorithm like cluster gradient or LBFGS and use that to try to minimize the cost function J as well.

4. content based recommendations,because we assume that we have features for the different movies.that capture what is the content of these movies. How romantic/action is this movie?And we are really using features of the content of the movies to make our predictions.




Collaborative Filtering协同过滤

{CF has an interesting property:feature learning can start to learn for itself what features to use}

技术分享

Note:we do not know the values of these features of movies.But assume we‘ve gone to each of our users, and each of our users has told us how much they like the romantic movies and how much they like action packed movies.each user J just tells us what is the value of theta J for them.

Optimization algorithm

技术分享

技术分享

Note:

1. kind of a chicken and egg problem.So randomly guess some value of the thetas.Now based on yourinitial random guess for the thetas, you can then go ahead and use the procedure to learn features for your different movies.
2. by rating a few movies myself,the system learn better features and then these features can be used by the system to make better movie predictions for everyone else.And so there is a sense of collaboration where every user is helping the system learn better features for the common good. This is this collaborative filtering.


Collaborative Filtering Algorithm协同过渡算法

{more efficient algorithm that doesn‘t need to go back and forth between the x‘s and the thetas, but that can solve for theta and x simultaneously}

Collaborative filteringoptimization objective

技术分享

Note:

1. Sum over J says, for every user, the sum of all the movies rated by that user.for every movie I, sum over all the users J that have rated that movie.
2. just something over all the user movie pairs for which you have a rating.
3. if you were to hold the x‘s constant and just minimize with respect to the thetas then you‘d be solving exactly the first problem.

4. Previously we have been using this convention that we have a feature x0 equals one that corresponds to an interceptor.When we are using this sort of formalism where we‘re are actually learning the features,we are actually going to do away with feature x0.And so the features we are going to learn x, will be in Rn.

Collaborative filtering algorithm

技术分享



Vectorization_ Low Rank Matrix Factorization向量化_低秩矩阵分解



Implementational Detail_ Mean Normalization实现细节_均值


from:http://blog.csdn.net/pipisorry/article/details/44850971


Machine Learning - XVI. Recommender Systems 推荐系统(Week 9)

标签:machine learning   机器学习   andrew   ng   推荐系统   

原文地址:http://blog.csdn.net/pipisorry/article/details/44850971

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!