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

Examples of org.apache.mahout.cf.taste.eval.RecommenderBuilder


public final class GenericRecommenderIRStatsEvaluatorImplTest extends TasteTestCase {

  @Test
  public void testEvaluate() throws Exception {
    DataModel model = getDataModel();
    RecommenderBuilder builder = new RecommenderBuilder() {
      @Override
      public Recommender buildRecommender(DataModel dataModel) throws TasteException {
        return new SlopeOneRecommender(dataModel);
      }
    };
View Full Code Here


public final class GenericRecommenderIRStatsEvaluatorImplTest extends TasteTestCase {

  @Test
  public void testBoolean() throws Exception {
    DataModel model = getBooleanDataModel();
    RecommenderBuilder builder = new RecommenderBuilder() {
      @Override
      public Recommender buildRecommender(DataModel dataModel) {
        return new GenericBooleanPrefItemBasedRecommender(dataModel, new LogLikelihoodSimilarity(dataModel));
      }
    };
View Full Code Here

public final class GenericRecommenderIRStatsEvaluatorImplTest extends TasteTestCase {

  @Test
  public void testEvaluate() throws Exception {
    DataModel model = getDataModel();
    RecommenderBuilder builder = new RecommenderBuilder() {
      @Override
      public Recommender buildRecommender(DataModel dataModel) throws TasteException {
        return new SlopeOneRecommender(dataModel);
      }
    };
View Full Code Here

  public static void evaluate(String ratingsFile)
      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,
View Full Code Here

 
  public static void main(String[] args) throws Exception {

  DataModel model = new FileDataModel(new File("ua.base.boolean-large.csv"));

  RecommenderBuilder builder = new RecommenderBuilder() {
    @Override
    public Recommender buildRecommender(DataModel model) throws TasteException {
      UserSimilarity similarity = new LogLikelihoodSimilarity(model);
      UserNeighborhood neighborhood = new NearestNUserNeighborhood(2, similarity, model);
      return new GenericUserBasedRecommender(model, neighborhood, similarity);
View Full Code Here

 
  public static void main(String[] args) throws Exception {

  DataModel model = new FileDataModel(new File("ua.base.boolean.csv"));

  RecommenderBuilder builder = new RecommenderBuilder() {
    @Override
    public Recommender buildRecommender(DataModel model) throws TasteException {
      return new GenericBooleanPrefItemBasedRecommender(model, new LogLikelihoodSimilarity(model));
    }
  };
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.eval.RecommenderBuilder

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.