org.mymedialite.ratingprediction
Class Extensions

java.lang.Object
  extended by org.mymedialite.ratingprediction.Extensions

public class Extensions
extends java.lang.Object

Class that contains static methods for rating prediction.


Method Summary
static void writePredictions(IRecommender recommender, IRatings ratings, java.io.PrintWriter writer, IEntityMapping userMapping, IEntityMapping itemMapping, java.lang.String separator)
          Rate a given set of instances and write it to a TextWriter.
static void writePredictions(IRecommender recommender, IRatings ratings, java.lang.String filename, IEntityMapping userMapping, IEntityMapping itemMapping, java.lang.String separator)
          Rate a given set of instances and write it to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writePredictions

public static void writePredictions(IRecommender recommender,
                                    IRatings ratings,
                                    java.io.PrintWriter writer,
                                    IEntityMapping userMapping,
                                    IEntityMapping itemMapping,
                                    java.lang.String separator)
Rate a given set of instances and write it to a TextWriter.

Parameters:
recommender - rating predictor
ratings - test cases
writer - the TextWriter to write the predictions to
userMapping - an EntityMapping object for the user IDs
itemMapping - an EntityMapping object for the item IDs
separator - the field separator to use

writePredictions

public static void writePredictions(IRecommender recommender,
                                    IRatings ratings,
                                    java.lang.String filename,
                                    IEntityMapping userMapping,
                                    IEntityMapping itemMapping,
                                    java.lang.String separator)
                             throws java.io.IOException
Rate a given set of instances and write it to a file.

Parameters:
recommender - rating predictor
ratings - test cases
filename - the name of the file to write the predictions to
userMapping - an EntityMapping object for the user IDs
itemMapping - an EntityMapping object for the item IDs
separator - the field separator to use
Throws:
java.io.IOException