Package org.apache.mahout.cf.taste.impl.eval

Examples of org.apache.mahout.cf.taste.impl.eval.AverageAbsoluteDifferenceRecommenderEvaluator.evaluate()


    // do nothing
  }

  public static void main(String... args) throws IOException, TasteException {
    RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator();
    double evaluation = evaluator.evaluate(new GroupLensRecommenderBuilder(),
                                                 new GroupLensDataModel(),
                                                 0.9,
                                                 0.1);
    log.info(String.valueOf(evaluation));
  }
View Full Code Here


  }

  public static void main(String... args) throws IOException, TasteException {
    RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator();
    DataModel model = new NetflixDataModel(new File(args[0]), true);
    double evaluation = evaluator.evaluate(new NetflixRecommenderBuilder(), model, 0.9, 0.1);
    log.info(String.valueOf(evaluation));
  }

}
View Full Code Here

 
  public static void main(String... args) throws IOException, TasteException, OptionException {
    RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator();
    File ratingsFile = TasteOptionParser.getRatings(args);
    DataModel model = ratingsFile == null ? new JesterDataModel() : new JesterDataModel(ratingsFile);
    double evaluation = evaluator.evaluate(new JesterRecommenderBuilder(),
      null,
      model,
      0.9,
      0.3);
    log.info(String.valueOf(evaluation));
View Full Code Here

    RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator();
    File ratingsFile = TasteOptionParser.getRatings(args);
    DataModel model =
        ratingsFile == null ? new BookCrossingDataModel(false) : new BookCrossingDataModel(ratingsFile, false);

    double evaluation = evaluator.evaluate(new BookCrossingRecommenderBuilder(),
      null,
      model,
      0.9,
      0.3);
    log.info(String.valueOf(evaluation));
View Full Code Here

 
  public static void main(String... args) throws IOException, TasteException, OptionException {
    RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator();
    File ratingsFile = TasteOptionParser.getRatings(args);
    DataModel model = ratingsFile == null ? new GroupLensDataModel() : new GroupLensDataModel(ratingsFile);
    double evaluation = evaluator.evaluate(new GroupLensRecommenderBuilder(),
      null,
      model,
      0.9,
      0.3);
    log.info(String.valueOf(evaluation));
View Full Code Here

  public static void main(String... args) throws IOException, TasteException, OptionException {
    RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator();
    File ratingsFile = TasteOptionParser.getRatings(args);
    if (ratingsFile != null) {
      DataModel model = new NetflixDataModel(ratingsFile, true);
      double evaluation = evaluator.evaluate(new NetflixRecommenderBuilder(), null, model, 0.9, 0.1);
      log.info(String.valueOf(evaluation));
    } else {
      log.error("Netflix Recommender needs a ratings file to work. Please provide it with the -i command line option.");
    }
  }
View Full Code Here

    if (ratingsFile != null) {
      model = new GroupLensDataModel(ratingsFile);
    } else {
      model = new GroupLensDataModel();
    }
    double evaluation = evaluator.evaluate(new GroupLensRecommenderBuilder(),
                                           null,
                                           model,
                                           0.9,
                                           0.3);
    log.info(String.valueOf(evaluation));
View Full Code Here

      model = new BookCrossingDataModel(ratingsFile);
    } else {
      model = new BookCrossingDataModel();
    }

    double evaluation = evaluator.evaluate(new BookCrossingRecommenderBuilder(),
                                           null,
                                           model,
                                           0.95,
                                           0.05);
    log.info(String.valueOf(evaluation));
View Full Code Here

    if (ratingsFile != null) {
      model = new JesterDataModel(ratingsFile);
    } else {
      model = new JesterDataModel();
    }
    double evaluation = evaluator.evaluate(new JesterRecommenderBuilder(),
                                           null,
                                           model,
                                           0.9,
                                           0.1);
    log.info(String.valueOf(evaluation));
View Full Code Here

      throws TasteException, IOException {
    DataModel model = new FileDataModel(new File(ratingsFile));
    RecommenderEvaluator evaluator =
        new AverageAbsoluteDifferenceRecommenderEvaluator();
    RecommenderBuilder recommenderBuilder = new MyRecommendBuilder();
    evaluator.evaluate(
        recommenderBuilder,
        null,
        model,
        0.95,
        0.05
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.