m0_72099742: 是数据量的问题,而且数据需要满足一定得要求才能够推荐出来,可以用debug模式看一下源码。Mahout源码中有这么一段: // Throw out the estimate if it was based on no data points, of course, but also if based on // just one. This is a bit of a band-aid on the 'stock' item-based algorithm for the moment. // The reason is that in this case the estimate is, simply, the user's rating for one item // that happened to have a defined similarity. The similarity score doesn't matter, and that // seems like a bad situation. if (count <= 1) { return ; } 当这个count<=1的时候就推荐不出来,推荐不出来的时候可以把邻居数设置成一个很大的数 //获取用户邻居 UserNeighborhood userNeighborhood = new NearestNUserNeighborhood(10, similarity, dataModel);像这里我就把它设置成了10(当然,还是有可能推荐不出来)
maven仓库中的.LastUpdated文件
springboot集成mahout实现简单基于协同过滤算法的文章推荐算法