tag:blogger.com,1999:blog-1107147718367558732.post7676307677398874803..comments2018-01-10T23:26:08.695-08:00Comments on This Number Crunching Life: Netflix algorithm: Prize Tribute Recommendation Algorithm in PythonDanny Tarlowhttp://www.blogger.com/profile/14670021337844708633noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-1107147718367558732.post-55886885460767709022016-07-11T01:35:31.800-07:002016-07-11T01:35:31.800-07:00Hi Danny,
Good to know your post, but how about d...Hi Danny,<br /><br />Good to know your post, but how about data in this post.<br /><br />Can you send me data for test program ?<br /><br />Thanks very much !Duc Phanhttps://www.blogger.com/profile/17889695958159205662noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-28448985522552192482014-03-23T05:56:10.065-07:002014-03-23T05:56:10.065-07:00Hello everyone, I am new to this topic. I know how...Hello everyone, I am new to this topic. I know how to use svd for collaborative filtering. But i am facing problems with PMF. i tried to understand your code but couldn't. i have some doubts regarding PMF. <br />1) In SVD matrix factorization , we decompose Rating matrix into feature matrices using svd and then use gradient descent to update the feature matrices using learning rate and techinfohttps://www.blogger.com/profile/08543054378597044956noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-77039039848966190372010-02-08T12:06:57.171-08:002010-02-08T12:06:57.171-08:00You could have fixed feature vectors. That's ...You could have fixed feature vectors. That's what Nati and I did in <a href="http://people.csail.mit.edu/jrennie/papers/ijcai05-preference.pdf" rel="nofollow">Loss Functions for Preference Levels: Regression with Discrete Ordered Labels</a>. There we used fixed ratings, but it's easy to adapt to relative ratings. Alternatively, you could simultaneously learn weight vectors and "Jasonhttps://www.blogger.com/profile/00489496856755184870noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-22864071844609975632010-02-08T11:53:29.516-08:002010-02-08T11:53:29.516-08:00Thanks, Jason. I thought you might have some thou...Thanks, Jason. I thought you might have some thoughts on the subject.<br /><br />One question: Are you suggesting that the movie vectors stay fixed? I don't think you mean so, but calling the movie representation a feature vector for classification would make me think so.<br /><br />But basically you are just saying to penalize each pairwise violation like you'd penalize a Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-61109268287620695372010-02-08T11:27:40.578-08:002010-02-08T11:27:40.578-08:00Re: relative ratings
Consider representing each m...Re: relative ratings<br /><br />Consider representing each movie as a feature vector and each user as a weight vector. Then, treat the relative ratings as classification examples such that the preferred movie should have the larger dot-product and solve all the classification problems simultaneously.<br /><br />Easy to do using the framework of Fast MMMF:<br /><br /><a href="http://Jasonhttps://www.blogger.com/profile/00489496856755184870noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-33789978927378504382010-02-06T14:46:15.083-08:002010-02-06T14:46:15.083-08:00It's an interesting question, dotdotdot. The ...It's an interesting question, dotdotdot. The first thing you'd need to do is change the objective function, since it's currently measuring the squared error between predicted and observed ratings--instead, you'd probably want it to somehow depend on the number of pairwise orderings that you violate.<br /><br />The problem will be that this objective function won't have an Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-23422255953108426082010-02-06T13:58:41.919-08:002010-02-06T13:58:41.919-08:00Hey Danny, that is a very interessting post. I am ...Hey Danny, that is a very interessting post. I am thinking about using the algorithm for a similar optimization but in this case I don't have an absolute rating for the movies. I just have relative ratings: The user can pick which of two movies he prefers. Could you think of a way to use this algorithm in this case?...https://www.blogger.com/profile/04846115459927552503noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-69757332136459690232010-01-22T05:54:19.858-08:002010-01-22T05:54:19.858-08:00cournape -- Ah, yes, you are correct. Thanks for ...cournape -- Ah, yes, you are correct. Thanks for the careful eye.<br /><br />(You're also right about the discrepancy. I made some changes first in my local copy of the code that produces all the outputs, then since they were small, I figured I'd just edit the blog code by hand. Never a good idea.)Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-48759158220782604152010-01-22T01:16:17.729-08:002010-01-22T01:16:17.729-08:00I think there is a discrepancy between your code a...I think there is a discrepancy between your code and what you used to show the data: a small mistake in line 122 causes the estimated user matrix to be a repeated stack of the same column vector after one gradient iteration.cournapehttp://cournape.wordpress.com/noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-58281304571467850432009-12-08T18:54:22.402-08:002009-12-08T18:54:22.402-08:00Thanks George. @sanity: what he said.
http://www...Thanks George. @sanity: what he said.<br /><br /><a href="http://www.cs.toronto.edu/~amnih/papers/pmf.pdf" rel="nofollow">http://www.cs.toronto.edu/~amnih/papers/pmf.pdf</a>Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-1606644359123098452009-12-08T09:19:17.372-08:002009-12-08T09:19:17.372-08:00@sanity: It has been tried on Netflix, just not b...@sanity: It has been tried on Netflix, just not by Danny.Georgehttps://www.blogger.com/profile/12790096318551866567noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-64367490060868726592009-12-08T07:23:51.443-08:002009-12-08T07:23:51.443-08:00This is interesting, but really without knowing ho...This is interesting, but really without knowing how it scores on the Netflix dataset its hard to assess its usefulness.<br /><br />I strongly recommend you run this on Netflix and determine its score. I'm not saying you need to aim to beat the Netflix prize, but anything below 0.91 would indicate that your approach has some degree of usefulness.<br /><br />For example, the "Simon Funk&sanityhttps://www.blogger.com/profile/08621739963082876297noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-58744058422427554602009-10-16T10:54:18.165-07:002009-10-16T10:54:18.165-07:00Yes, sir!Yes, sir!Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-77016959794678101382009-10-16T09:56:06.648-07:002009-10-16T09:56:06.648-07:00Whatever application you think is must suited to a...Whatever application you think is must suited to a demo. Something with a reasonably manageable and understandable dataset. Maybe non-vision data? Surprise me. :)Georgehttps://www.blogger.com/profile/12790096318551866567noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-74910131667433286702009-10-16T09:39:10.828-07:002009-10-16T09:39:10.828-07:00I've been deliberately stalling on this becaus...I've been deliberately stalling on this because I intend to release quite a bit of max-product code in the near future, but yes, this would be very doable. Any specific applications areas you'd like to request?Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-90807688433190577092009-10-16T09:30:40.055-07:002009-10-16T09:30:40.055-07:00Here is a suggestion for another post that would f...Here is a suggestion for another post that would fit in your series of simple machine learning algorithms in python.<br /><br />How about sum-product? Or max-product? Or something? And then do a bit of learning with a small graphical model.Georgehttps://www.blogger.com/profile/12790096318551866567noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-3596076679468476442009-10-15T09:22:30.614-07:002009-10-15T09:22:30.614-07:00Maybe you'd be interested in MMMF?
http://peo...Maybe you'd be interested in MMMF?<br /><br />http://people.csail.mit.edu/jrennie/matlab/<br /><br />(Using the appropriate loss) MMMF can be viewed as a generalization of regularized logistic regression to a matrix of discrete, ordered labels.<br /><br />You might also be interested in a writeup I did comparing ordinal regression loss functions (which are important when predicting discrete, Pussinbootshttps://www.blogger.com/profile/00489496856755184870noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-77910329173249310582009-09-14T14:52:48.681-07:002009-09-14T14:52:48.681-07:00sorry for my accidental deletion.
and thanks for t...sorry for my accidental deletion.<br />and thanks for the confirmation.sunqianghttps://www.blogger.com/profile/11692206612910737410noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-57100780882521929272009-09-14T09:11:03.486-07:002009-09-14T09:11:03.486-07:00Good catch, sunquiang. Thanks.
Line 180 should b...Good catch, sunquiang. Thanks.<br /><br />Line 180 should be indented 4 spaces more -- I've corrected it above.<br /><br />Everything still works the same, but making the change will run it on a more realistic data set.Danny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-59907917492073618052009-09-14T08:28:45.170-07:002009-09-14T08:28:45.170-07:00This comment has been removed by the author.sunqianghttps://www.blogger.com/profile/11692206612910737410noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-47866221633847702822009-09-14T06:34:13.421-07:002009-09-14T06:34:13.421-07:00There's nothing in theory that should keep it ...There's nothing in theory that should keep it from working on the Netflix problem. In practice, stochastic gradient descent or mini-batch gradient descent seems to work a little better (as opposed to my batch update), and you could be more efficient about computing the gradients. In C this would be fine, but I think in Python you'd be better off replacing the for loops with map calls orDanny Tarlowhttps://www.blogger.com/profile/14670021337844708633noreply@blogger.comtag:blogger.com,1999:blog-1107147718367558732.post-46385616887798509442009-09-13T21:38:16.333-07:002009-09-13T21:38:16.333-07:00What would be the problem in applying your code on...What would be the problem in applying your code on the NetFlix data?Joseph Turianhttps://www.blogger.com/profile/06249878639857416906noreply@blogger.com