Package org.apache.mahout.cf.taste.model

Examples of org.apache.mahout.cf.taste.model.DataModel


  private LibimsetiEvalRunner() {
  }

  public static void main(String[] args) throws Exception {
    DataModel model = new FileDataModel(new File("ratings.dat"));

    RecommenderEvaluator evaluator =
      new AverageAbsoluteDifferenceRecommenderEvaluator();

    RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
View Full Code Here


  private LibimsetiLoadRunner() {
  }

  public static void main(String[] args) throws Exception {
    DataModel model = new FileDataModel(new File("ratings.dat"));
    Recommender rec = new LibimsetiRecommender(model);
    LoadEvaluator.runLoad(rec);
  }
View Full Code Here

  private LibimsetiIREvalRunner() {
  }

  public static void main(String[] args) throws Exception {
    DataModel model = new FileDataModel(new File("ratings.dat"));
    model = new GenericBooleanPrefDataModel(GenericBooleanPrefDataModel.toDataMap(model));
      RecommenderIRStatsEvaluator evaluator =
        new GenericRecommenderIRStatsEvaluator();
      RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
        @Override
View Full Code Here

  private GroupLens10MEvalIntro() {
  }

  public static void main(String[] args) throws Exception {
    DataModel model = new GroupLensDataModel(new File("ratings.dat"));

    RecommenderEvaluator evaluator =
      new AverageAbsoluteDifferenceRecommenderEvaluator();
    RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
      @Override
View Full Code Here

    prefsForUser1.setItemID(1, 102L);
    prefsForUser1.setValue(1, 4.5f);

    preferences.put(1L, prefsForUser1);

    DataModel model = new GenericDataModel(preferences);
    System.out.println(model);
  }
View Full Code Here

  private GroupLensDataModelIntro() {
  }

  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);
View Full Code Here

    modelFile = new File("intro.csv");
  if(!modelFile.exists()) {
    System.err.println("Please, specify name of file, or put file 'input.csv' into current directory!");
    System.exit(1);
  }
    DataModel model = new FileDataModel(modelFile);

    RecommenderEvaluator evaluator =
      new AverageAbsoluteDifferenceRecommenderEvaluator();
    // Build the same recommender for testing that we did last time:
    RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
View Full Code Here

  private IREvaluatorBooleanPrefIntro1() {
  }

  public static void main(String[] args) throws Exception {
    DataModel model = new GenericBooleanPrefDataModel(
        GenericBooleanPrefDataModel.toDataMap(
          new FileDataModel(new File("ua.base"))));

    RecommenderEvaluator evaluator =
      new AverageAbsoluteDifferenceRecommenderEvaluator();
View Full Code Here

    modelFile = new File("intro.csv");
  if(!modelFile.exists()) {
    System.err.println("Please, specify name of file, or put file 'input.csv' into current directory!");
    System.exit(1);
  }
    DataModel model = new FileDataModel(modelFile);

    RecommenderIRStatsEvaluator evaluator =
      new GenericRecommenderIRStatsEvaluator();
    // Build the same recommender for testing that we did last time:
    RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
View Full Code Here

  private IREvaluatorBooleanPrefIntro2() {
  }

  public static void main(String[] args) throws Exception {
    DataModel model = new GenericBooleanPrefDataModel(
        GenericBooleanPrefDataModel.toDataMap(
          new FileDataModel(new File("ua.base"))));

    RecommenderIRStatsEvaluator evaluator =
      new GenericRecommenderIRStatsEvaluator();
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.model.DataModel

Copyright © 2018 www.massapicom. 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.