Examples of RefreshHelper


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

    this.clusterSimilarity = clusterSimilarity;
    this.numClusters = Integer.MIN_VALUE;
    this.clusteringThreshold = clusteringThreshold;
    this.clusteringByThreshold = true;
    this.buildClustersLock = new ReentrantLock();
    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

    super(dataModel);
    if (similarity == null) {
      throw new IllegalArgumentException("similarity is null");
    }
    this.similarity = similarity;
    this.refreshHelper = new RefreshHelper(null);
    refreshHelper.addDependency(dataModel);
    refreshHelper.addDependency(similarity);
  }
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 = 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

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

    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

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

  private final JDBCDataModel delegate;
  private final RefreshHelper refreshHelper;

  public ReloadFromJDBCDataModel(JDBCDataModel delegate) throws TasteException {
    this.delegate = Preconditions.checkNotNull(delegate);
    refreshHelper = new RefreshHelper(new Callable<Void>() {
      @Override
      public Void call() {
        reload();
        return null//To change body of implemented methods use File | Settings | File Templates.
      }
View Full Code Here

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

  private final RefreshHelper refreshHelper;

  protected AbstractFactorizer(DataModel dataModel) throws TasteException {
    this.dataModel = dataModel;
    buildMappings();
    refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildMappings();
        return null;
      }
View Full Code Here

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

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

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

    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
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.