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

Examples of org.apache.mahout.cf.taste.impl.recommender.GenericBooleanPrefUserBasedRecommender


      RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
        @Override
        public Recommender buildRecommender(DataModel model) throws TasteException {
          UserSimilarity similarity = new TanimotoCoefficientSimilarity(model);
          UserNeighborhood neighborhood = new NearestNUserNeighborhood(2, similarity, model);
          return new GenericBooleanPrefUserBasedRecommender(model, neighborhood, similarity);
        }
      };
      IRStatistics stats = evaluator.evaluate(recommenderBuilder, null, model, null, 10, Double.NaN, 0.1);
      System.out.println(stats);
  }
View Full Code Here


      @Override
      public Recommender buildRecommender(DataModel model) throws TasteException {
        UserSimilarity similarity = new LogLikelihoodSimilarity(model);
        UserNeighborhood neighborhood =
          new NearestNUserNeighborhood(10, similarity, model);
        return new GenericBooleanPrefUserBasedRecommender(model, neighborhood, similarity);
      }
    };
    DataModelBuilder modelBuilder = new DataModelBuilder() {
      @Override
      public DataModel buildDataModel(FastByIDMap<PreferenceArray> trainingData) {
View Full Code Here

  private final Recommender recommender;

  public BookCrossingBooleanRecommender(DataModel bcModel) throws TasteException {
    UserSimilarity similarity = new CachingUserSimilarity(new LogLikelihoodSimilarity(bcModel), bcModel);
    UserNeighborhood neighborhood = new NearestNUserNeighborhood(10, Double.NEGATIVE_INFINITY, similarity, bcModel, 1.0);
    recommender = new GenericBooleanPrefUserBasedRecommender(bcModel, neighborhood, similarity);
  }
View Full Code Here

  public BookCrossingBooleanRecommender(DataModel bcModel) throws TasteException {
    UserSimilarity similarity = new CachingUserSimilarity(new LogLikelihoodSimilarity(bcModel), bcModel);
    UserNeighborhood neighborhood =
        new NearestNUserNeighborhood(10, Double.NEGATIVE_INFINITY, similarity, bcModel, 1.0);
    recommender = new GenericBooleanPrefUserBasedRecommender(bcModel, neighborhood, similarity);
  }
View Full Code Here

  public BookCrossingBooleanRecommender(DataModel bcModel) throws TasteException {
    UserSimilarity similarity = new CachingUserSimilarity(new LogLikelihoodSimilarity(bcModel), bcModel);
    UserNeighborhood neighborhood =
        new NearestNUserNeighborhood(10, Double.NEGATIVE_INFINITY, similarity, bcModel, 1.0);
    recommender = new GenericBooleanPrefUserBasedRecommender(bcModel, neighborhood, similarity);
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.impl.recommender.GenericBooleanPrefUserBasedRecommender

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.