Search code examples
mahoutrecommendation-enginemahout-recommender

how to combine mahout recommendations


I'd like to build a simple recommendation system. Let's say for online shop, where I have events like purchases, likes, views.

Currently, I understand how to build a recommendation for each of those types of events separately. But, I can't figure out how to combine those results to provide a user a single list of the most relevant items.

It would be great if you could point me to the docs or briefly explain so I could google it.

Thanks in advance!


Solution

  • There are different ways how to combine the recommendations.

    One straight forward way is built three types of recommenders (or as many as you need), and put the recommendations from all of them into one list, and sort it by the estimated preference value. You can even have a wrapper recommender that combines your other recommenders underneath.

    Another way is to combine the similarity metrics, instead of the recommendations. Again, you will have a CustomSimilarity class that implements the User/ItemSimilarity, depending on what you need, and combine the outputs of your individual similarity metrics into one as a linear combination. You should actually be careful when combining similarities. They should all be either User similarity measures or Item similarity measures. Then you will use this CustomSimilarity measure for your recommender.

    You can read more about hybrid recommendation in this book.