You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by James James <re...@yahoo.com> on 2009/11/03 03:50:02 UTC

Re: recommender on binary data

It has been a while since we talked about this topic, but the score returned is not just adding up the similarity values that anybody in the neighborhood has to the item. IT is atucally devided by the totalSimilarity. As result, I think the score is still 1.0. Did I miss something? See the codes below.
 for(User user : theNeighborhood) {if(!user.equals(theUser)) {// See GenericItemBasedRecommender.doEstimatePreference() tooPreference pref = user.getPreferenceFor(itemID);
preference += theSimilarity * pref.getValue();
totalSimilarity += theSimilarity;
}
}
}
}
 
 




________________________________
From: Sean Owen <sr...@gmail.com>
To: mahout-user@lucene.apache.org
Sent: Tue, July 28, 2009 10:18:11 AM
Subject: Re: recommender on binary data

Yeah I just mean that it should in theory always return 1.0, but it
doesn't, in order to return something useful. Take a look at
estimatePreference(). It is just adding up all the similarity values
that anybody in the neighborhood has to the item. This simply favors
items that more users like you are associated to, which is a
reasonable heuristic for ordering the recommendations.

On Tue, Jul 28, 2009 at 4:15 PM, James James<re...@yahoo.com> wrote:
> Thanks, can you elaborate a little bit on "I abuse the value of the estimated
> preference in this case to return differing values depending on the
> strength of the association between the user and item". Is this reflected in the codes somewhere?
>
> Thanks,
>
>
>
>
> ________________________________
> From: Sean Owen <sr...@gmail.com>
> To: mahout-user@lucene.apache.org
> Sent: Tuesday, July 28, 2009 10:11:55 AM
> Subject: Re: recommender on binary data
>
> Well.. good question. Really, I abuse the value of the estimated
> preference in this case to return differing values depending on the
> strength of the association between the user and item. It's not always
> 1.0 actually.
>
> It is certainly 'wrong' in a theoretical sense but seemed more useful
> than just always saying '1.0'.
>
> On Tue, Jul 28, 2009 at 4:09 PM, James James<re...@yahoo.com> wrote:
>> Thanks, I think the method recommend() returns an ordered list of items from the test items. If the return value of estimatePreference() is all the same for all the test items, how does the method recommend() decide the order in which it puts each test item on the ordered list.
>
>
>
>
if(pref != null) {doubletheSimilarity = similarity.userSimilarity(theUser, user) + 1.0;if(!Double.isNaN(theSimilarity)) {returntotalSimilarity == 0.0 ? Double.NaN: preference / totalSimilarity;


      

Re: recommender on binary data

Posted by Sean Owen <sr...@gmail.com>.
That sounds like old code then, not the latest version. In fact I am
pretty sure you are right that in older code (probably 0.1) it wasn't
doing what I say.

Update to the latest SVN code, or, keep your eyes peeled for 0.2 which
should be released any day now.

On Tue, Nov 3, 2009 at 1:46 PM, James James <re...@yahoo.com> wrote:
> Hi, Thanks for the reply. In fact, the code I quote comes from the class BooleanUserGenericUserBasedRecommender. I do not know if that is what you refer to as GenericBooleanPrefBasedRecommender. I could not find a class by the name GenericBooleanPrefBasedRecommender under org.apache.mahout.cf.taste.impl.recommender.
>
> Thanks again.
>
>
>
>
> ________________________________
> From: Sean Owen <sr...@gmail.com>
> To: mahout-user@lucene.apache.org
> Sent: Tue, November 3, 2009 1:13:39 AM
> Subject: Re: recommender on binary data
>
> Not sure if I ever asked on this thread: are you using
> GenericBooleanPrefUserBasedRecommender? this is the class that alters
> GenericUserBasedRecommender with this abused notion of estimated
> preference. The code you quote is not from
> GenericBooleanPrefUserBasedRecommender.
>
> On Tue, Nov 3, 2009 at 2:50 AM, James James <re...@yahoo.com> wrote:
>> It has been a while since we talked about this topic, but the score returned is not just adding up the similarity values that anybody in the neighborhood has to the item. IT is atucally devided by the totalSimilarity. As result, I think the score is still 1.0. Did I miss something? See the codes below.
>>  for(User user : theNeighborhood) {if(!user.equals(theUser)) {// See GenericItemBasedRecommender.doEstimatePreference() tooPreference pref = user.getPreferenceFor(itemID);
>> preference += theSimilarity * pref.getValue();
>> totalSimilarity += theSimilarity;
>> }
>> }
>> }
>> }
>>
>
>
>
>

Re: recommender on binary data

Posted by James James <re...@yahoo.com>.
Hi, Thanks for the reply. In fact, the code I quote comes from the class BooleanUserGenericUserBasedRecommender. I do not know if that is what you refer to as GenericBooleanPrefBasedRecommender. I could not find a class by the name GenericBooleanPrefBasedRecommender under org.apache.mahout.cf.taste.impl.recommender.
 
Thanks again.




________________________________
From: Sean Owen <sr...@gmail.com>
To: mahout-user@lucene.apache.org
Sent: Tue, November 3, 2009 1:13:39 AM
Subject: Re: recommender on binary data

Not sure if I ever asked on this thread: are you using
GenericBooleanPrefUserBasedRecommender? this is the class that alters
GenericUserBasedRecommender with this abused notion of estimated
preference. The code you quote is not from
GenericBooleanPrefUserBasedRecommender.

On Tue, Nov 3, 2009 at 2:50 AM, James James <re...@yahoo.com> wrote:
> It has been a while since we talked about this topic, but the score returned is not just adding up the similarity values that anybody in the neighborhood has to the item. IT is atucally devided by the totalSimilarity. As result, I think the score is still 1.0. Did I miss something? See the codes below.
>  for(User user : theNeighborhood) {if(!user.equals(theUser)) {// See GenericItemBasedRecommender.doEstimatePreference() tooPreference pref = user.getPreferenceFor(itemID);
> preference += theSimilarity * pref.getValue();
> totalSimilarity += theSimilarity;
> }
> }
> }
> }
>



      

Re: recommender on binary data

Posted by Sean Owen <sr...@gmail.com>.
Not sure if I ever asked on this thread: are you using
GenericBooleanPrefUserBasedRecommender? this is the class that alters
GenericUserBasedRecommender with this abused notion of estimated
preference. The code you quote is not from
GenericBooleanPrefUserBasedRecommender.

On Tue, Nov 3, 2009 at 2:50 AM, James James <re...@yahoo.com> wrote:
> It has been a while since we talked about this topic, but the score returned is not just adding up the similarity values that anybody in the neighborhood has to the item. IT is atucally devided by the totalSimilarity. As result, I think the score is still 1.0. Did I miss something? See the codes below.
>  for(User user : theNeighborhood) {if(!user.equals(theUser)) {// See GenericItemBasedRecommender.doEstimatePreference() tooPreference pref = user.getPreferenceFor(itemID);
> preference += theSimilarity * pref.getValue();
> totalSimilarity += theSimilarity;
> }
> }
> }
> }
>