public static LoadStatistics runLoad(Recommender recommender) throws TasteException { return runLoad(recommender, 10); }
public static LoadStatistics runLoad(Recommender recommender) throws TasteException { return runLoad(recommender, 10); }
public static LoadStatistics runLoad(Recommender recommender) throws TasteException { return runLoad(recommender, 10); }
public static void main(String[] args) throws Exception { DataModel model = new FileDataModel(new File("ratings.dat")); Recommender rec = new LibimsetiRecommender(model); LoadEvaluator.runLoad(rec); }
public static void main(String[] args) throws Exception { DataModel model = new GroupLensDataModel(new File("ratings.dat")); UserSimilarity similarity = new PearsonCorrelationSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(100, similarity, model); Recommender recommender = new GenericUserBasedRecommender(model, neighborhood, similarity); LoadEvaluator.runLoad(recommender); }
public static void main(String[] args) throws Exception { DataModel model = new FileDataModel(new File(args[0])); int howMany = 10; if (args.length > 1) { howMany = Integer.parseInt(args[1]); } System.out.println("Run Items"); ItemSimilarity similarity = new EuclideanDistanceSimilarity(model); Recommender recommender = new GenericItemBasedRecommender(model, similarity); // Use an item-item recommender for (int i = 0; i < LOOPS; i++) { LoadStatistics loadStats = LoadEvaluator.runLoad(recommender, howMany); System.out.println(loadStats); } System.out.println("Run Users"); UserSimilarity userSim = new EuclideanDistanceSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(10, userSim, model); recommender = new GenericUserBasedRecommender(model, neighborhood, userSim); for (int i = 0; i < LOOPS; i++) { LoadStatistics loadStats = LoadEvaluator.runLoad(recommender, howMany); System.out.println(loadStats); } }