Examples of RefreshHelper


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

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

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

                                     UserSimilarity similarity) {
    super(dataModel);
    Preconditions.checkArgument(neighborhood != null, "neighborhood is null");
    this.neighborhood = neighborhood;
    this.similarity = similarity;
    this.refreshHelper = new RefreshHelper(null);
    refreshHelper.addDependency(dataModel);
    refreshHelper.addDependency(similarity);
    refreshHelper.addDependency(neighborhood);
    capper = buildCapper();
  }
View Full Code Here

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

                                     ItemSimilarity similarity,
                                     CandidateItemsStrategy candidateItemsStrategy) {
    super(dataModel, candidateItemsStrategy);
    Preconditions.checkArgument(similarity != null, "similarity is null");
    this.similarity = similarity;
    this.refreshHelper = new RefreshHelper(null);
    refreshHelper.addDependency(dataModel);
    refreshHelper.addDependency(similarity);
    capper = buildCapper();
  }
View Full Code Here

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

    this.dataModel = dataModel;
    this.weighted = weighting == Weighting.WEIGHTED;
    this.centerData = centerData;
    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

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

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

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

    Preconditions.checkArgument(numClusters >= 2, "numClusters must be at least 2");
    this.clusterSimilarity = clusterSimilarity;
    this.numClusters = numClusters;
    this.clusteringThreshold = Double.NaN;
    this.clusteringByThreshold = false;
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildClusters();
        return null;
      }
View Full Code Here

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

    Preconditions.checkArgument(!(Double.isNaN(clusteringThreshold)), "clusteringThreshold must not be NaN");
    this.clusterSimilarity = clusterSimilarity;
    this.numClusters = Integer.MIN_VALUE;
    this.clusteringThreshold = clusteringThreshold;
    this.clusteringByThreshold = true;
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildClusters();
        return null;
      }
View Full Code Here

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

    this.getRecommendableItemsSQL = getRecommendableItemsSQL;
    this.deleteDiffsSQL = deleteDiffsSQL;
    this.createDiffsSQL = createDiffsSQL;
    this.diffsExistSQL = diffsExistSQL;
    this.minDiffCount = minDiffCount;
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
        return null;
      }
View Full Code Here

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

   
    emSvd = new ExpectationMaximizationSVD(numUsers, numItems, numFeatures, defaultValue);
    cachedPreferences = new ArrayList<Preference>(numUsers);
    recachePreferences();
   
    refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        recachePreferences();
        // TODO: train again
        return null;
View Full Code Here

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

    this.numClusters = numClusters;
    this.clusteringThreshold = Double.NaN;
    this.clusteringByThreshold = false;
    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
TOP
Copyright © 2018 www.massapi.com. 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.