How to get k similar products using Mahout?

筅森魡賤 提交于 2019-12-08 08:45:14

问题


I have one product, let's say a book. Now I want to retrieve k products, that are similar to this product. How can I do this with Mahout?

The products are stored in a MySQL database so I'd use the JDBCDataModel. For computing the similarities I'd prefer the LogLikelihoodTest.

But which recommender should I choose? It seems that all recommenders are designed


回答1:


I'm going to guess at the question here. You have user-item data, where users are real people and items are books. You are using LogLikelihoodSimilarity as the basis for some recommender, either user-based or item-based.

You don't need a recommender if you just want most similar items. Just use LogLikelihoodSimilarity, which is an ItemSimilarity, to compute similarity with all other items and take the most similar ones. In fact look at the TopItems class which even does that logic for you.



来源:https://stackoverflow.com/questions/8787468/how-to-get-k-similar-products-using-mahout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!