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

Examples of org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender$Estimator


class LimitedMemoryDiffStorage {

  Recommender buildRecommender(DataModel model) throws TasteException {
    DiffStorage diffStorage = new MemoryDiffStorage(
        model, Weighting.WEIGHTED, 10000000L);
    return new SlopeOneRecommender(
        model, Weighting.WEIGHTED, Weighting.WEIGHTED, diffStorage);
  }
View Full Code Here


class SlopeOneJDBC {

  Recommender buildRecommender() throws TasteException {
    AbstractJDBCDataModel model = new MySQLJDBCDataModel();
    DiffStorage diffStorage = new MySQLJDBCDiffStorage(model);
    return new SlopeOneRecommender(
        model, Weighting.WEIGHTED, Weighting.WEIGHTED, diffStorage);
  }
View Full Code Here

class SlopeOneNoWeighting {

  Recommender buildRecommender(DataModel model) throws TasteException {
    DiffStorage diffStorage = new MemoryDiffStorage(
        model, Weighting.UNWEIGHTED, Long.MAX_VALUE);
    return new SlopeOneRecommender(
      model,
      Weighting.UNWEIGHTED,
      Weighting.UNWEIGHTED,
      diffStorage);
  }
View Full Code Here

  public void testEvaluate() throws Exception {
    DataModel model = getDataModel();
    RecommenderBuilder builder = new RecommenderBuilder() {
      @Override
      public Recommender buildRecommender(DataModel dataModel) throws TasteException {
        return new SlopeOneRecommender(dataModel);
      }
    };
    RecommenderEvaluator evaluator = new RMSRecommenderEvaluator();
    double eval = evaluator.evaluate(builder, null, model, 0.85, 1.0);
    assertEquals(0.40311285537839375, eval, EPSILON);
View Full Code Here

  public void testEvaluate() throws Exception {
    DataModel model = getDataModel();
    RecommenderBuilder builder = new RecommenderBuilder() {
      @Override
      public Recommender buildRecommender(DataModel dataModel) throws TasteException {
        return new SlopeOneRecommender(dataModel);
      }
    };
    RecommenderEvaluator evaluator =
        new AverageAbsoluteDifferenceRecommenderEvaluator();
    double eval = evaluator.evaluate(builder, null, model, 0.85, 1.0);
View Full Code Here

  public void testEvaluate() throws Exception {
    DataModel model = getDataModel();
    RecommenderBuilder builder = new RecommenderBuilder() {
      @Override
      public Recommender buildRecommender(DataModel dataModel) throws TasteException {
        return new SlopeOneRecommender(dataModel);
      }
    };
    RecommenderIRStatsEvaluator evaluator = new GenericRecommenderIRStatsEvaluator();
    IRStatistics stats = evaluator.evaluate(builder, null, model, null, 1, 0.2, 1.0);
    assertNotNull(stats);
View Full Code Here

    random = RandomUtils.getRandom();
  }

  public void testSlopeOneLoad() throws Exception {
    DataModel model = createModel();
    Recommender recommender = new CachingRecommender(new SlopeOneRecommender(model));
    doTestLoad(recommender, 60);
  }
View Full Code Here

   *
   * @param dataModel data model
   * @throws TasteException if an error occurs while initializing this
   */
  public GroupLensRecommender(DataModel dataModel) throws TasteException {
    recommender = new CachingRecommender(new SlopeOneRecommender(dataModel));
  }
View Full Code Here

public final class JesterRecommender implements Recommender {
 
  private final Recommender recommender;
 
  public JesterRecommender(DataModel dataModel) throws TasteException {
    recommender = new CachingRecommender(new SlopeOneRecommender(dataModel));
  }
View Full Code Here

public final class NetflixRecommender implements Recommender {
 
  private final Recommender recommender;
 
  public NetflixRecommender(DataModel dataModel) throws TasteException {
    recommender = new SlopeOneRecommender(dataModel);
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender$Estimator

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.