Thanks, My proposed solution for this is to add a method in Recommender interface (e.g isUserItemInclude) and pass a Recommender class in method getCandidateItem in both CandidateItemStrategy and MostSimilarItemsCandidateItemsStrategy interfaces. For example, in method doGetCandidateItems of PreferredItemsNeighborhoodCandidateItemsStrategy class - that implements these two interfaces, it has line possibleItemsIDs.removeAll(preferredItemIDs) to remove user's preferable items.
In addition, we need to list which Recommender classes that including/not user's item in returned recommendation. Any advice and suggestions will be greatly appreciate. Thanks, Dodi On 2 May 2014 16:53, Sebastian Schelter (JIRA) <[email protected]> wrote: > > [ > https://issues.apache.org/jira/browse/MAHOUT-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] > > Sebastian Schelter reopened MAHOUT-1428: > ---------------------------------------- > > > here you are > > > Recommending already consumed items > > ----------------------------------- > > > > Key: MAHOUT-1428 > > URL: https://issues.apache.org/jira/browse/MAHOUT-1428 > > Project: Mahout > > Issue Type: Bug > > Components: Collaborative Filtering > > Reporter: Mario Levitin > > Fix For: 1.0 > > > > > > Mahout does 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 for many other cases it is not. > > The Recommender classes (I mean all of them, NN-based and SVD-based as > well as hadoop and non-hadoop versions) might have a parameter for this for > excluding or not excluding user items in the returned recommendations. > > > > -- > This message was sent by Atlassian JIRA > (v6.2#6252) >
