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);