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

Examples of org.apache.mahout.cf.taste.impl.common.FastIDSet.toArray()


          neighborhood.add(otherUserID);
        }
      }
    }
   
    return neighborhood.toArray();
  }
 
  @Override
  public String toString() {
    return "ThresholdUserNeighborhood";
View Full Code Here


        log.info("Processed {} users", currentCount);
      }
    }
    log.info("Processed {} users", currentCount);
   
    this.itemIDs = itemIDSet.toArray();
    itemIDSet = null; // Might help GC -- this is big
    Arrays.sort(itemIDs);
   
    this.preferenceForItems = toDataMap(prefsForItems, false);
   
View Full Code Here

          neighborhood.add(otherUserID);
        }
      }
    }
   
    return neighborhood.toArray();
  }
 
  @Override
  public String toString() {
    return "ThresholdUserNeighborhood";
View Full Code Here

    log.info("Processed {} users", currentCount);

    setMinPreference(minPrefValue);
    setMaxPreference(maxPrefValue);

    this.itemIDs = itemIDSet.toArray();
    itemIDSet = null; // Might help GC -- this is big
    Arrays.sort(itemIDs);

    this.preferenceForItems = toDataMap(prefsForItems, false);
View Full Code Here

      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
    allSimilarItemIDs.remove(itemID);
    return allSimilarItemIDs.toArray();
  }
 
  @Override
  public void refresh(Collection<Refreshable> alreadyRefreshed) {
  // do nothing
View Full Code Here

    log.info("Processed {} users", currentCount);

    setMinPreference(minPrefValue);
    setMaxPreference(maxPrefValue);

    this.itemIDs = itemIDSet.toArray();
    itemIDSet = null; // Might help GC -- this is big
    Arrays.sort(itemIDs);

    this.preferenceForItems = toDataMap(prefsForItems, false);
View Full Code Here

      long possiblySimilarItemID = allItemIDs.nextLong();
      if (!Double.isNaN(itemSimilarity(itemID, possiblySimilarItemID))) {
        allSimilarItemIDs.add(possiblySimilarItemID);
      }
    }
    return allSimilarItemIDs.toArray();
  }

  @Override
  public void refresh(Collection<Refreshable> alreadyRefreshed) {
    refreshHelper.refresh(alreadyRefreshed);
View Full Code Here

      long possiblySimilarItemID = allItemIDs.nextLong();
      if (!Double.isNaN(itemSimilarity(itemID, possiblySimilarItemID))) {
        allSimilarItemIDs.add(possiblySimilarItemID);
      }
    }
    return allSimilarItemIDs.toArray();
  }

  @Override
  public void refresh(Collection<Refreshable> alreadyRefreshed) {
    // do nothing
View Full Code Here

  }

  @Override
  public long[] allSimilarItemIDs(long itemID) {
    FastIDSet similarItemIDs = similarItemIDsIndex.get(itemID);
    return similarItemIDs != null ? similarItemIDs.toArray() : NO_IDS;
  }
 
  @Override
  public void refresh(Collection<Refreshable> alreadyRefreshed) {
  // Do nothing
View Full Code Here

          neighborhood.add(otherUserID);
        }
      }
    }
   
    return neighborhood.toArray();
  }
 
  @Override
  public String toString() {
    return "ThresholdUserNeighborhood";
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.