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

Examples of org.apache.mahout.cf.taste.impl.common.RefreshHelper


    this.numClusters = Integer.MIN_VALUE;
    this.clusteringThreshold = clusteringThreshold;
    this.clusteringByThreshold = true;
    this.samplingPercentage = samplingPercentage;
    this.buildClustersLock = new ReentrantLock();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildClusters();
        return null;
      }
View Full Code Here


    }
    this.dataModel = dataModel;
    this.weighted = weighting == Weighting.WEIGHTED;
    this.cachedNumItems = dataModel.getNumItems();
    this.cachedNumUsers = dataModel.getNumUsers();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        cachedNumItems = dataModel.getNumItems();
        cachedNumUsers = dataModel.getNumUsers();
        return null;
View Full Code Here

  public ItemAverageRecommender(DataModel dataModel) {
    super(dataModel);
    this.itemAverages = new FastMap<Object, RunningAverage>();
    this.buildAveragesLock = new ReentrantReadWriteLock();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
        return null;
      }
View Full Code Here

    if (neighborhood == null) {
      throw new IllegalArgumentException("neighborhood is null");
    }
    this.neighborhood = neighborhood;
    this.similarity = similarity;
    this.refreshHelper = new RefreshHelper(null);
    refreshHelper.addDependency(dataModel);
    refreshHelper.addDependency(similarity);
    refreshHelper.addDependency(neighborhood);
  }
View Full Code Here

    super(dataModel);
    this.itemAverages = new FastMap<Object, RunningAverage>();
    this.userAverages = new FastMap<Object, RunningAverage>();
    this.overallAveragePrefValue = new FullRunningAverage();
    this.buildAveragesLock = new ReentrantReadWriteLock();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
        return null;
      }
View Full Code Here

      throw new IllegalArgumentException("samplingRate must be in (0,1]");
    }
    this.userSimilarity = userSimilarity;
    this.dataModel = dataModel;
    this.samplingRate = samplingRate;
    this.refreshHelper = new RefreshHelper(null);
    this.refreshHelper.addDependency(this.dataModel);
    this.refreshHelper.addDependency(this.userSimilarity);
  }
View Full Code Here

    this.maxEntries = maxEntries;
    this.averageDiffs = new FastMap<Object, FastMap<Object, RunningAverage>>();
    this.averageItemPref = new FastMap<Object, RunningAverage>();
    this.buildAverageDiffsLock = new ReentrantReadWriteLock();
    this.allRecommendableItemIDs = new FastSet<Item>(dataModel.getNumItems());
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
        return null;
      }
View Full Code Here

    if (neighborhood == null) {
      throw new IllegalArgumentException("neighborhood is null");
    }
    this.neighborhood = neighborhood;
    this.similarity = similarity;
    this.refreshHelper = new RefreshHelper(null);
    refreshHelper.addDependency(dataModel);
    refreshHelper.addDependency(similarity);
    refreshHelper.addDependency(neighborhood);
  }
View Full Code Here

    int numUsers = recommender.getDataModel().getNumUsers();
    this.recommendationCache =
        new Cache<Object, Recommendations>(new RecommendationRetriever(this.recommender), numUsers);
    this.estimatedPrefCache =
            new Cache<Pair<?, ?>, Double>(new EstimatedPrefRetriever(this.recommender), numUsers);
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() {
        clear();
        return null;
      }
View Full Code Here

    this.clusterSimilarity = clusterSimilarity;
    this.numClusters = numClusters;
    this.clusteringThreshold = Double.NaN;
    this.clusteringByThreshold = false;
    this.buildClustersLock = new ReentrantLock();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildClusters();
        return null;
      }
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.impl.common.RefreshHelper

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.