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

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


    super(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


  public InverseUserFrequency(DataModel dataModel, double logBase) throws TasteException {
    Preconditions.checkArgument(logBase > 1.0, "logBase should be > 1.0");
    this.dataModel = Preconditions.checkNotNull(dataModel);
    this.logBase = logBase;
    this.iufFactors = new FastByIDMap<Double>();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        recompute();
        return null;
      }
View Full Code Here

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

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

    Preconditions.checkArgument(numClusters >= 2, "numClusters must be at least 2");
    this.clusterSimilarity = Preconditions.checkNotNull(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

    Preconditions.checkArgument(!Double.isNaN(clusteringThreshold), "clusteringThreshold must not be NaN");
    this.clusterSimilarity = Preconditions.checkNotNull(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

    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

    Preconditions.checkArgument(similarity != null, "similarity is null");
    this.similarity = similarity;
    Preconditions.checkArgument(mostSimilarItemsCandidateItemsStrategy != null,
        "mostSimilarItemsCandidateItemsStrategy is null");
    this.mostSimilarItemsCandidateItemsStrategy = mostSimilarItemsCandidateItemsStrategy;
    this.refreshHelper = new RefreshHelper(new Callable<Void>() {
      @Override
      public Void call() {
        capper = buildCapper();
        return null;
      }
View Full Code Here

   
    if (factorization == null) {
      train();
    }
   
    refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        train();
        return null;
      }
View Full Code Here

    super(dataModel);
    this.itemAverages = new FastByIDMap<RunningAverage>();
    this.userAverages = new FastByIDMap<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

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.