July 29th, 2009

Koren’s SVD++ Python Implementation

I recently had to implement a recommender system for the Netflix Prize. Out of the best known models, I chose Yehuda Koren’s SVD++ model as published on the paper entitled “Factorization Meets the Neighborhood: a Multifaceted Collaborative Filtering Model” (the version that doesn’t take into account temporal effects; I’d have implemented the complete model, but couldn’t due to time constraints).

I named this Python-based project “wooflix” and you can download it from code.gustavonarea.net. It ships with a command-line interface and basic documentation, including the design document.

It’s the first project, as far as I know, that uses Booleano. With it, you can get random movie recommendations and filter them, like this:

# Get 5 movie recommendations for user #7, at least those published after 2001
wooflix recommendations 7 --max="5" --filter="movie:year > 2001"

Keep in mind that I won’t offer support for it; I’m publishing because I thought it might be useful for some people, but I have no intentions to work on it in the future.

Comments

  1. matteo on 09 Oct 2009 at 12:27 pm #

    hi, I’m trying to figure out your code implementing svd++ in matlab enviroment..
    I’m not sure, but I think I found something maybe wrong,
    in the predict_rating() method at a certain point you wrote:

    # Finally, the prediction:
    preferences = user.factors_vector.multiply_by_list(implicit_prefences, self.session)

    shouldn’t there be a sum operation between vectors instead of a multiply?

  2. cristi on 14 Jun 2010 at 2:33 pm #

    Hi there,

    I’m trying to understand the svd++ algorithm for my masters thesis and I’m looking at your implementation.
    I see that in wooflixcli you are importing the Recommender module, which I can’t seem to find in the source you provided.

    Am I missing something ?

    Thanks in advance.

« | »

  • About the author

    You're visiting the technical blog of Gustavo Narea, a Software Developer based in Oxford.