Permalink
Browse files

Added new VectorSimilarities and new datasets.

  • Loading branch information...
1 parent 41feff4 commit f8454c7ae812c48f742fd47ecd9a55b2d272bee9 @marcelcaraciolo committed Aug 22, 2012
Showing with 384,239 additions and 0 deletions.
  1. +12 −0 booksSimilarities.py
  2. +12 −0 moviesSimilarities_up.py
  3. +383,852 −0 ratings_books.csv
  4. +49 −0 sample_songs.csv
  5. +314 −0 vectorSimilarities.py
View
@@ -0,0 +1,12 @@
+
+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()
View
@@ -0,0 +1,12 @@
+
+from vectorSimilarities import VectorSimilarities
+
+
+class MovieSimilarities(VectorSimilarities):
+
+ def input(self, key, line):
+ user_id, item_id, rating = line.split('|')
+ yield item_id, (user_id, float(rating))
+
+if __name__ == '__main__':
+ MovieSimilarities.run()
Oops, something went wrong.

0 comments on commit f8454c7

Please sign in to comment.