# How to determine a user's favorite content producer from individual ratings?

Consider the following scenario:

Alice subscribes to a video rental service that allows her to watch movies. Every time A watches a movie, she rates it either thumbs up (1) or thumbs down (0), and she then chooses the next movie she wants to watch. Every movie belongs to exactly one director, and a director can have directed many movies. The question is, what is the best way to determine who A's "favorite" director is?

My initial thought was do something like:

• For each director of at least one movie that A watched, calculate the lower bound of some binomial confidence interval (e.g. Wilson score interval) as A's "favorability" score for that director

However, this binomial approach seems flawed because it ignores a seemingly crucial piece of information: Alice has an entire universe of movies to choose from, and if she consistently chooses to watch movies from a certain director, then doesn't that tell us something about her preference for that director, even if she then rates that director's movies below her average? I feel like there must be some element of "voting with one's feet" that is ignored if we only consider ratings on the movies that were watched.

What is the best way to combine both the selection of movie/director with the ratings on individual movies to determine who is A's favorite director? It seems like A's preference for director D has to be a function of A's ratings on D's movies that she watched, and also the % of all of D's movies that A chose to watch.

UPDATE: I should make clear, the problem I'm dealing with isn't quite as simple as the thumbs up/thumbs down case, it's really more like "A watches a movie and then checks a box if she liked it." So each viewing does result in a 0 or a 1, but the absence of checking a box isn't quite the same thing as a "thumbs down" because the viewer might only feel compelled to check the "approve" box if she really likes something. All the more reason that the choice of what to watch has to factor into preferences

• Does the answer need to have confidence intervals? Sep 6, 2012 at 22:59
• no, my initial approach was to use the lower bound of the Wilson score interval because that seemed like a reasonable thing to do in the case of small sample sizes. But I'm open to proposed methods that don't rely on confidence intervals
– tws
Sep 7, 2012 at 3:09
• See the tag recommender-system. Jul 12, 2019 at 0:08

Your question indicates that you want a score that gives some weight both to watching a film (whether the user likes it or not) and some additional weight to liking it. I would start by defining $M_{ud}$ as the maximum possible number of films by director $d$ watched by user $u$ as a proportion of all films watched by $u$:

$M_{ud} = Min(N_d/W_u, 1)$

where $N_d$ is the total number of films made by $d$ and $W_u$ is the total number of films watched by $u$. (The $Min$ is there because this proportion logically can't exceed 1). Then $W_{ud} / W_u$ is the actual number of films by $d$ watched by $u$ as a proportion of all films watched by $u$, and

$s_w = \frac{W_{ud}}{W_uM_{ud}}$

is a possible measure of how much $u$ likes $d$. But because we also have information on 'likes', we have a second possible measure

$s_l = \frac{L_{ud}}{W_uM_{ud}}$

where $L_{ud}$ is the number of films by $d$ liked by $u$. Finally you can combine $s_w$ and $s_l$ into a single score, for instance:

$s = (1 - b)s_w + bs_l$

where b is a number you choose between 0 and 1 to reflect the relative importance of liking a film rather than just watching it.

It should be stressed that the exact functional forms used are arbitrary and you should play with them (and the weighting, b) until you get scores that make sense for you. For instance raising the two scores to a power greater than 1 might be useful as it would assign lower weight to the first 1 or 2 films watched/liked and more weight to the 6th or 7th.

• Just to add, you might want to transform $N_d$, $W_{ud}$, and $L_{ud}$ in some way prior to using them, for instance by taking logarithms or constraining them to be no greater than 10, otherwise extremely prolific/older directors will tend to get relatively low scores. Nov 7, 2012 at 15:44
• Thanks, I like this approach, and in fact I've been pursuing something like it, although I'm still tinkering with the functional form
– tws
Nov 12, 2012 at 3:53
• another thought... you could use the centre of the Wilson interval as the two scores, with $\hat p = L_{ud} / W_{ud}$ to calculate the 'like' score and $\hat p = W_{ud} / W_u$ for the 'watch' score, and then normalize the watch score somehow with reference to the maximum value it could have taken given $W_u$ and $N_d$. Nov 12, 2012 at 7:57

A really simple answer is the modal director, but that does not adjust for the composition, since some directors may be more prolific or simply older.

For each user, I would consider the ratio of liked movies by director $i$ to all movies watched by director $i$, scaled by the ratio of all movies watched to all movies made by director $i$. When a user has not seen any movies directed by $i$, this ratio is undefined, and can be reset to zero. The director with the highest value of this quantity is the favorite. I got the geometric intuition for this formula from a Venn diagram. I think this controls for the size of each director's corpus and is bounded between 0 and 1.

Here are some examples with made up numbers. Alice has liked 5 movies by Herzog out of the 10 he has made and all of which she has seen. She has watched 20 movies total. The Herzog score is $\frac{5}{10}/{\frac{20}{10}}=0.25$. Suppose she has only seen seven Herzogs. The score jumps to $\frac{5}{7}/{\frac{20}{10}}=0.35$.

People also tend to watch movies in groups, and so they see movies they dislike. This needs to be accounted for. Suppose Alice has only watched Herzog to humor her husband Bob and she liked none of them. The score is now $\frac{0}{10}/{\frac{20}{10}}=0$. To me, this is the sensible interpretation of watching and disliking. It does not depend on how many Herzogs she has seen.

This approach does not explicitly use the sequence of movies. It probably matters if she watched all the Greenway films before all the Herzogs. On the other hand, people develop tastes over time, so maybe the order is less interesting, though maybe you can use the timing to break ties. It also does not use the "clumpiness". If she watched every Herzog in a row after seeing the first one, that's a strong signal she likes his work, compared to if they were all scattered throughout her viewing history. Maybe you can scale the score above by an entropy measure, but I don't know enough about this to really help.

I think that some kind of recommender system might be what you are looking for.

• I'm somewhat familiar with recommender systems, but my question is more of the form "who is A's favorite director", not "what movie should I tell A to watch next?" Are you suggesting that I build some kind of model, and then presumably that model has some director-level parameters that could be used to say something like "which director has the greatest impact on the probability of A liking a movie?" If that's the case though, then how does it take into account the number of movies A has chosen to watch from the same director, independent of A's ratings on those movies?
– tws
Sep 6, 2012 at 22:06