13
$\begingroup$

I am looking to implement a dynamic model to recommend a movie to a user. The recommendation should be updated every time the user watches a movie or rates it. To keep it simple I am thinking of taking two factors into account:

  • the past ratings of other movies by the user
  • the time that the user watched certain past movies

How would one setup such a model, and what does the academic literature recommend?

I am new in this field and am guessing that a linear regresion model could provide a good outcome, not to fancy around with complexer methods to avoid imposing unnecessary uncertainty in the parameter estimations. But perhaps there are already established methods that are commonly used in practice?

$\endgroup$
  • 3
    $\begingroup$ I don't think this is too broad to be answerable. Eg, it has 2 upvoted answers. $\endgroup$ – gung - Reinstate Monica Dec 12 '15 at 10:22
  • 2
    $\begingroup$ Try coursera's Mining Massive Datasets and its free book! $\endgroup$ – Felipe Gerard Dec 12 '15 at 15:32
  • 2
    $\begingroup$ You probably want to look up matrix and/or tensor factorization. $\endgroup$ – Marc Claesen Dec 12 '15 at 18:55
  • 1
    $\begingroup$ @usεr11852 My answer is broader than the question. $\endgroup$ – shadowtalker Dec 12 '15 at 21:55
  • 1
    $\begingroup$ @usεr11852, the question title asks, "What statistical methods are there... ?" The last sentence asks if there are methods other than regression. I think several answers below provide this sort of information. $\endgroup$ – gung - Reinstate Monica Dec 12 '15 at 21:55
14
$\begingroup$

This is actually a relatively famous problem in the field of machine learning. In ~2006 Netflix offered $1m to the algorithm that provided the best reasonable improvement to their recommender system. The theory of the winning solution is briefly discussed in this Caltech textbook on introductory machine learning.

Basically an ensemble learning method was used. In particular, a type of blending or stacking was employed. This is nontrivial, but kind of intuitive. To understand the intuition of using different statistical approaches in harmony, consider the different reasons different people like the same movies: i.e., Joe may like Topgun because he loves 80s action movies, while Jane likes Topgun because she likes movies with Kenny Loggins soundtracks. So the fact that both viewers watched (and rated the movie highly) doesn't necessarily mean they will like other movies with high probability. The prediction algorithm would ideally be able to accommodate these differences, at least in some capacity.

This may make the solution sound pretty simple, but balancing competing algorithms and prioritizing the best guess for each case is definitely not simple. The fact that Netflix offered such a large bounty should make the magnitude of the challenge rather obvious.

If you are just starting in machine learning, checking out the above resources may be helpful depending on your interest level and your maths background. So regression would probably work okay-to-good, but significantly better performance is possible.

$\endgroup$
  • 2
    $\begingroup$ +1 for the Netflix prize. As you pointed out, that prize is a good indicator of how massive this challenge is. $\endgroup$ – Cort Ammon - Reinstate Monica Dec 12 '15 at 4:29
11
$\begingroup$

Half the challenge in these problems is knowing what to search for.

You might have added the tag without realizing it, but you're in fact looking for info on recommender systems. You might want to start with collaborative filtering, or better yet the Introduction to Recommender Systems Handbook by Ricci, Rokach, and Shapira cited on that page.

$\endgroup$
  • $\begingroup$ I indeed looked deeper into the tag, and came across mostly examples on collaborative filtering. The issue that I have with that method is that it depends on other users input, if I understood the concept. I am more looking for methods in a situation of one user, no other data or optionally other data. Will have a look at your other references. $\endgroup$ – JohnAndrews Dec 12 '15 at 2:32
  • 1
    $\begingroup$ @JohnAndrews: I think that ssdecontrol gives you the most relevant advice. You need to look into recommender systems literature. There are many techniques involved, eg. NNMF, Funk SVD, many different variants of nearest-neighbours classifiers, etc. to name some obvious ones. In the end you want to use collaborative filtering but you can't just "dive in" without any background. $\endgroup$ – usεr11852 says Reinstate Monic Dec 12 '15 at 7:03
  • $\begingroup$ @JohnAndrews CrossValidated is usually a bad place to start learning about a subject, especially if you just search by tag. How about looking at the references I linked instead? Wikipedia statistics articles aren't always reliable, but these are pretty good and cite plenty of references. $\endgroup$ – shadowtalker Dec 12 '15 at 17:37
6
$\begingroup$

You should check out Andrew Ng's course on Coursera: https://www.coursera.org/learn/machine-learning It has a lesson on building recommender systems, which appears to be what you're looking for. Essentially it is a form of linear regression that learns synthetic attributes for movies from people that rated films and uses that to predict recommendations for people that didn't rate/watch the films.

$\endgroup$
  • 3
    $\begingroup$ Welcome to our site! Thanks for including some information that summarises the contents of the link, rather than just providing a "bare" link - we appreciate it. $\endgroup$ – Silverfish Dec 12 '15 at 13:27
4
$\begingroup$

In the Netflix Challenge (Oct 2006 - Sep 2009) a very large ensemble (107 separate submodels) won the $1M grand prize in the end, but it is instructive to note that the first simple (non ensembled) algorithms to beat the Netflix Cinematch benchmark were based on a generalized (sparse matrix) SVD. This first milestone of beating Cinematch was achieved a mere 6 days after the competition begun by a team called WXYZConsulting.

SVD (Singular Value Decomposition) is a matrix factorization algorithm where you start with a 2d [user, movie] matrix with a rating (1 to 5 stars) in each [u, m] position (*), and break it into 3 matrices where the middle matrix is a square-matrix of latent interactions between users and movies.

You can make the square matrix rank smaller or larger to include more or less such latent factor interactions respectively.

There are several free software implementations of fast/efficient sparse SVD. For example redsvd, or vowpal-wabbit so before you write your own, you may want to try them.

(*) Most of these entries are zero, since most users haven't rated most movies. i.e. the matrix is very sparse.

References:

$\endgroup$
  • $\begingroup$ What did Netflix use before? $\endgroup$ – jona Dec 22 '15 at 20:56
  • 2
    $\begingroup$ An algorithm called "Cinematch" which isn't public but has been described as " linear combination of various factors refined over the years" e.g. weigthed average global rating (G) + weighted average user[u] rating + weighted average movie[m] rating, ... etc. $\endgroup$ – arielf Dec 22 '15 at 21:42
  • $\begingroup$ Thanks for the elaborated answer. Will dig into it. As for the linear combinations, isnt a big problem of that over-parameterization? That would be my preferred approach. But SVD sounds promising. $\endgroup$ – JohnAndrews Dec 23 '15 at 0:10
  • $\begingroup$ Not a problem if you only add factors which improve generalization error. Obviously, you need to test every such addition on unseen data to gain the necessary confidence. $\endgroup$ – arielf Dec 23 '15 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.