Re: Recommend items not rated by any user

2014-03-05 Thread Juan José Ramos
In case somebody runs into the same situation, the key seems to be in the CandidateItemStrategy being passed to the constructor of GenericItemBasedRecommender. Looking into the code, if no CandidateItemStrategy is specified in the constructor, PreferredItemsNeighborhoodCandidateItemsStrategy is

Re: Recommend items not rated by any user

2014-03-05 Thread Sebastian Schelter
Hi Juan, that is a good catch. CandidateItemsStrategy is the right place to implement this. Maybe we should simply extend its interface to add a parameter that says whether to keep or remove the current users items? We could even do this in the abstract base class then. --sebastian On

Re: Recommend items not rated by any user

2014-03-05 Thread Juan José Ramos
Thanks for the reply, Sebastian. I am not sure if that should be implemented in the Abstract base class though because for instance PreferredItemsNeighborhoodCandidateItemsStrategy, by definition, it returns the item not rated by the user and rated by somebody else. Back to my last post, I have

Re: Recommend items not rated by any user

2014-03-05 Thread Sebastian Schelter
On 03/05/2014 01:23 PM, Juan José Ramos wrote: Thanks for the reply, Sebastian. I am not sure if that should be implemented in the Abstract base class though because for instance PreferredItemsNeighborhoodCandidateItemsStrategy, by definition, it returns the item not rated by the user and rated

Re: Recommend items not rated by any user

2014-03-05 Thread Tevfik Aytekin
Sorry there was a typo in the previous paragraph. If I remember correctly, AllSimilarItemsCandidateItemsStrategy returns all items that have not been rated by the user and the similarity metric returns a non-NaN similarity value with at least one of the items preferred by the user. On Wed, Mar

Re: Recommend items not rated by any user

2014-03-05 Thread Juan José Ramos
Hi Tefik, Thanks for the response. I think what you says contradicts what Sebastian pointed out before. Also, if AllSimilarItemsCandidateItemsStrategy returns all items that have not been rated by the user, what would AllUnknownItemsCandidateItemsStrategy return? On Wed, Mar 5, 2014 at 1:40 PM,

Re: Recommend items not rated by any user

2014-03-05 Thread Tevfik Aytekin
Juan, You got me wrong, AllSimilarItemsCandidateItemsStrategy returns all items that have not been rated by the user and the similarity metric returns a non-NaN similarity value with at least one of the items preferred by the user. So, it does not simply return all items that have not been

Re: Recommend items not rated by any user

2014-03-05 Thread Pat Ferrel
I am ignoring the rest of the thread because I suspect it may have gotten off track. Your data is new articles, right? You would like to recommend from known articles to any user based on an article they rate or even view. You have no collaborative filtering data because the lifetime of a news

Re: Recommend items not rated by any user

2014-03-05 Thread Juan José Ramos
@Pat. You described my situation very well. The only additional thing is that I am also interested in creating some sort of a profile from the user with all the information s/he has provided by interacting with the articles and not only recommending similar items (news) based on a specific input.

Re: Recommend items not rated by any user

2014-03-05 Thread Juan José Ramos
@Tevfik, running this recommender: GenericItemBasedRecommender itemRecommender = new GenericItemBasedRecommender(dataModel, itemSimilarity, new AllSimilarItemsCandidateItemsStrategy(itemSimilarity), new AllSimilarItemsCandidateItemsStrategy(itemSimilarity)); With this dataModel: 1,1,1.0 1,2,2.0

Re: Recommend items not rated by any user

2014-03-05 Thread Tevfik Aytekin
If the similarity between item 5 and two of the items user 1 preferred are not NaN then it will return 1, that is what I'm saying. If the similarities were all NaN then it will not return it. But surely, you might wonder if all similarities between an item and user's items are NaN, then

Re: Recommend items not rated by any user

2014-03-05 Thread Sebastian Schelter
So both strategies seems to be effectively the same, I don't know what the implementers had in mind when designing AllSimilarItemsCandidateItemsStrategy. It can take a long time to estimate preferences for all items a user doesn't know. Especially if you have a lot of items. Traditional

Re: Recommend items not rated by any user

2014-03-05 Thread Tevfik Aytekin
Hi Sebastian, But in order not to select items that is not similar to at least one of the items the user interacted with you have to compute the similarity with all user items (which is the main task for estimating the preference of an item in item-based method). So, it seems to me that

Re: Recommend items not rated by any user

2014-03-05 Thread Pat Ferrel
I agree. IMHO using the Mahout recommenders is wrong for this. The recommenders are the CF/cooccurrence type that expect usage or rating data on fairly long lived items from a somewhat static catalog. Trying to make them work for content based recommendations is needlessly difficult especially

Re: Recommend items not rated by any user

2014-03-05 Thread Tevfik Aytekin
It can even make things worse in SVD-based algorithms for which preference estimation is very fast. On Wed, Mar 5, 2014 at 7:00 PM, Tevfik Aytekin tevfik.ayte...@gmail.com wrote: Hi Sebastian, But in order not to select items that is not similar to at least one of the items the user interacted

Re: Recommend items not rated by any user

2014-03-05 Thread Sebastian Schelter
For SVD based algorithms, you would should use the AllUnknownItems Strategy then, thats correct. In the majority of industry usecases that I have seen, people use pre-computed item similarities (Mahout has lots of machinery for doing this, btw), so AllSimilarItems totally makes sense there.