You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Chris Schilling <ch...@gmail.com> on 2011/06/02 20:07:43 UTC
Intersection of 2 PreferenceArrays
Hello,
I am trying to do a little bit deeper inspection of some of the recommendations I am seeing. I was curious if the API exists to return the intersection of 2 PreferenceArray objects.
Thanks
Chris
Re: Intersection of 2 PreferenceArrays
Posted by Lance Norskog <go...@gmail.com>.
You're right- I hunted down the problem I found before, and now it is
not there. Grrr.
On 6/3/11, Sean Owen <sr...@gmail.com> wrote:
> I don't think there's any problem with the method, it's quite simple.
>
> On Sat, Jun 4, 2011 at 4:15 AM, Lance Norskog <go...@gmail.com> wrote:
>
>> I vaguely remember having trouble with the intersection size method.
>> Be sure to test it.
>>
>>
>
--
Lance Norskog
goksron@gmail.com
Re: Intersection of 2 PreferenceArrays
Posted by Sean Owen <sr...@gmail.com>.
I don't think there's any problem with the method, it's quite simple.
On Sat, Jun 4, 2011 at 4:15 AM, Lance Norskog <go...@gmail.com> wrote:
> I vaguely remember having trouble with the intersection size method.
> Be sure to test it.
>
>
Re: Intersection of 2 PreferenceArrays
Posted by Lance Norskog <go...@gmail.com>.
I vaguely remember having trouble with the intersection size method.
Be sure to test it.
On Fri, Jun 3, 2011 at 2:50 PM, Chris Schilling <ch...@cellixis.com> wrote:
> I did end up walking the PreferenceArrays side-by-side using the hasPrefWithUserID method. I knew I saw an intersection size somewhere, I forgot it was for the FastIDSet.
>
> Thanks for the replies,
> Chris
>
> On Jun 3, 2011, at 2:40 PM, Lance Norskog wrote:
>
>> One of the methods that returns a PreferenceArray requires the output
>> be sorted; the rest do not. If it is the sorted output, you can walk
>> them side-by-side. Otherwise, what Steven said.
>>
>> On Thu, Jun 2, 2011 at 1:07 PM, Steven Bourke <sb...@gmail.com> wrote:
>>> Your best bet is to probably load the item id's from the recommendations
>>> from each user / recommendation list into a FastIDSet. The FastIDSet has an
>>> intersection size method.
>>>
>>> On Thu, Jun 2, 2011 at 7:07 PM, Chris Schilling
>>> <ch...@gmail.com>wrote:
>>>
>>>> Hello,
>>>>
>>>> I am trying to do a little bit deeper inspection of some of the
>>>> recommendations I am seeing. I was curious if the API exists to return the
>>>> intersection of 2 PreferenceArray objects.
>>>>
>>>> Thanks
>>>> Chris
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Lance Norskog
>> goksron@gmail.com
>
>
--
Lance Norskog
goksron@gmail.com
Re: Intersection of 2 PreferenceArrays
Posted by Chris Schilling <ch...@cellixis.com>.
I did end up walking the PreferenceArrays side-by-side using the hasPrefWithUserID method. I knew I saw an intersection size somewhere, I forgot it was for the FastIDSet.
Thanks for the replies,
Chris
On Jun 3, 2011, at 2:40 PM, Lance Norskog wrote:
> One of the methods that returns a PreferenceArray requires the output
> be sorted; the rest do not. If it is the sorted output, you can walk
> them side-by-side. Otherwise, what Steven said.
>
> On Thu, Jun 2, 2011 at 1:07 PM, Steven Bourke <sb...@gmail.com> wrote:
>> Your best bet is to probably load the item id's from the recommendations
>> from each user / recommendation list into a FastIDSet. The FastIDSet has an
>> intersection size method.
>>
>> On Thu, Jun 2, 2011 at 7:07 PM, Chris Schilling
>> <ch...@gmail.com>wrote:
>>
>>> Hello,
>>>
>>> I am trying to do a little bit deeper inspection of some of the
>>> recommendations I am seeing. I was curious if the API exists to return the
>>> intersection of 2 PreferenceArray objects.
>>>
>>> Thanks
>>> Chris
>>>
>>>
>>
>
>
>
> --
> Lance Norskog
> goksron@gmail.com
Re: Intersection of 2 PreferenceArrays
Posted by Lance Norskog <go...@gmail.com>.
One of the methods that returns a PreferenceArray requires the output
be sorted; the rest do not. If it is the sorted output, you can walk
them side-by-side. Otherwise, what Steven said.
On Thu, Jun 2, 2011 at 1:07 PM, Steven Bourke <sb...@gmail.com> wrote:
> Your best bet is to probably load the item id's from the recommendations
> from each user / recommendation list into a FastIDSet. The FastIDSet has an
> intersection size method.
>
> On Thu, Jun 2, 2011 at 7:07 PM, Chris Schilling
> <ch...@gmail.com>wrote:
>
>> Hello,
>>
>> I am trying to do a little bit deeper inspection of some of the
>> recommendations I am seeing. I was curious if the API exists to return the
>> intersection of 2 PreferenceArray objects.
>>
>> Thanks
>> Chris
>>
>>
>
--
Lance Norskog
goksron@gmail.com
Re: Intersection of 2 PreferenceArrays
Posted by Steven Bourke <sb...@gmail.com>.
Your best bet is to probably load the item id's from the recommendations
from each user / recommendation list into a FastIDSet. The FastIDSet has an
intersection size method.
On Thu, Jun 2, 2011 at 7:07 PM, Chris Schilling
<ch...@gmail.com>wrote:
> Hello,
>
> I am trying to do a little bit deeper inspection of some of the
> recommendations I am seeing. I was curious if the API exists to return the
> intersection of 2 PreferenceArray objects.
>
> Thanks
> Chris
>
>