I am using a GenericItemBasedRecommender and have faced the same problem.

In my case the items are news and the user does not provide an explicit
rating but the system would infer one for him/her based on the actions he
makes: Reading, sharing, favouriting...

The approach I have followed has been that on one hand, I get the list of
recommended items the recommender provides and on the other hand, from the
DataModel, I get those items with highest ratings.

I blend the two lists but the obvious problem is that the rating for the
recommended items will never exceed the highest rating of the already
consumed items. What I have done in that case is to apply a penalizing
factor to the items the user has already consumed when blending the two
lists. I'm not quite happy with that approach. Maybe somebody can provide a
better one.


On Sat, Mar 1, 2014 at 9:32 PM, Mario Levitin <[email protected]>wrote:

> Hi,
> Mahout do not recommend items which are already consumed by the user.
>
> For example,
> In the getAllOtherItems method of GenericUserBasedRecommender class there
> is the following line
>
> possibleItemIDs.removeAll(dataModel.getItemIDsFromUser(theUserID));
>
> which removes user's items from the possibleItemIDs to prevent these items
> from being recommended to the user. This is ok for many recommendation
> cases but in my case it is not.
>
> What is the best way to change this behavior, for example I might create a
> new class which extends GenericUserBasedRecommender and overwrite the
> getAllOtherItems and remove line
>
> possibleItemIDs.removeAll(dataModel.getItemIDsFromUser(theUserID));
>
>
> Thanks.
>

Reply via email to