org.mymedialite.io
Class MovieLensRatingData

java.lang.Object
  extended by org.mymedialite.io.MovieLensRatingData

public class MovieLensRatingData
extends java.lang.Object

Class that offers static methods for reading in MovieLens 1M and 10M rating data. See http://www.grouplens.org/node/73#attachments and http://recsyswiki.com/wiki/MovieLens


Method Summary
static ITimedRatings read(java.io.BufferedReader reader, IEntityMapping user_mapping, IEntityMapping item_mapping)
          Read in rating data from a TextReader.
static ITimedRatings read(java.lang.String filename, IEntityMapping user_mapping, IEntityMapping item_mapping)
          Read in rating data from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static ITimedRatings read(java.lang.String filename,
                                 IEntityMapping user_mapping,
                                 IEntityMapping item_mapping)
                          throws java.io.IOException
Read in rating data from a file.

Parameters:
filename - the name of the file to read from, "-" if STDIN
user_mapping - mapping object for user IDs
item_mapping - mapping object for item IDs
Returns:
the rating data
Throws:
java.io.IOException

read

public static ITimedRatings read(java.io.BufferedReader reader,
                                 IEntityMapping user_mapping,
                                 IEntityMapping item_mapping)
                          throws java.io.IOException
Read in rating data from a TextReader.

Parameters:
reader - the to read from
user_mapping - mapping object for user IDs
item_mapping - mapping object for item IDs
Returns:
the rating data
Throws:
java.io.IOException