我是新手Apache Mahout
。我很困惑GenericUserBasedRecommender
方法是如何工作的。例如:
UserSimilarity similarity =new PearsonCorrelationSimilarity (dataModel);
UserNeighborhood neighborhood =new NearestNUserNeighborhood (2, similarity, dataModel);
Recommender recommender = new GenericUserBasedRecommender (dataModel, neighborhood, similarity);
Recommender cachingRecommender = new CachingRecommender(recommender);
List<RecommendedItem> recommendations = cachingRecommender.recommend(12,10);
结果是:
user4 10.45
user12 7.93
user3 2.49
但是,如果我使用List<RecommendedItem> recommendations = cachingRecommender.recommend(12,5);
没有recommendations
。
列出的建议是由什么决定的?有阈值吗?