@Test public void testMostSimilar() throws Exception { UserBasedRecommender recommender = buildRecommender(); long[] similar = recommender.mostSimilarUserIDs(1, 2); assertNotNull(similar); assertEquals(2, similar.length); assertEquals(2, similar[0]); assertEquals(3, similar[1]); }
@Override public long[] mostSimilarUserIDs(long userID, int howMany) throws TasteException { return mostSimilarUserIDs(userID, howMany, null); }
GenericUserBasedRecommender extends AbstractRecommender implements UserBasedRecommender { @Override public long[] mostSimilarUserIDs(long userID, int howMany) throws TasteException { return mostSimilarUserIDs(userID, howMany, null); } }
GenericUserBasedRecommender extends AbstractRecommender implements UserBasedRecommender { @Override public long[] mostSimilarUserIDs(long userID, int howMany) throws TasteException { return mostSimilarUserIDs(userID, howMany, null); } GenericUserBasedRecommender(DataModel dataModel,
                                     UserNeighborhood neighborhood,
                                     UserSimilarity similarity); }
GenericUserBasedRecommender extends AbstractRecommender implements UserBasedRecommender { @Override public long[] mostSimilarUserIDs(long userID, int howMany) throws TasteException { return mostSimilarUserIDs(userID, howMany, null); } GenericUserBasedRecommender(DataModel dataModel,
                                     UserNeighborhood neighborhood,
                                     UserSimilarity similarity); UserSimilarity getSimilarity(); @Override List<RecommendedItem> recommend(long userID, int howMany, IDRescorer rescorer, boolean includeKnownItems); @Override float estimatePreference(long userID, long itemID); @Override long[] mostSimilarUserIDs(long userID, int howMany); @Override long[] mostSimilarUserIDs(long userID, int howMany, Rescorer<LongPair> rescorer); @Override void refresh(Collection<Refreshable> alreadyRefreshed); @Override String toString(); }
GenericUserBasedRecommender extends AbstractRecommender implements UserBasedRecommender { @Override public long[] mostSimilarUserIDs(long userID, int howMany) throws TasteException { return mostSimilarUserIDs(userID, howMany, null); } GenericUserBasedRecommender(DataModel dataModel,
                                     UserNeighborhood neighborhood,
                                     UserSimilarity similarity); UserSimilarity getSimilarity(); @Override List<RecommendedItem> recommend(long userID, int howMany, IDRescorer rescorer, boolean includeKnownItems); @Override float estimatePreference(long userID, long itemID); @Override long[] mostSimilarUserIDs(long userID, int howMany); @Override long[] mostSimilarUserIDs(long userID, int howMany, Rescorer<LongPair> rescorer); @Override void refresh(Collection<Refreshable> alreadyRefreshed); @Override String toString();  }