Created
August 22, 2012 20:30
-
-
Save marcelcaraciolo/3429077 to your computer and use it in GitHub Desktop.
books similarities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vectorSimilarities import VectorSimilarities | |
class BookSimilarities(VectorSimilarities): | |
def input(self, key, line): | |
user_id, item_id, rating = line.split(';') | |
yield item_id, (user_id, float(rating)) | |
if __name__ == '__main__': | |
BookSimilarities.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment