mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: [jira] Updated: (MAHOUT-95) UserSimilarity-based NearestNNeighborhood
Date Thu, 15 Jan 2009 21:09:45 GMT
Change this.minSim = 0;   to    this.minSim = Double.NEGATIVE_INFINITY;
and then you can remove the check for it being > 0 later. This is
because similarity could be negative.
Then you can cull the commented lines, then looks good to me.

Yeah I like just pushing it together rather than making two classes here.

On Thu, Jan 15, 2009 at 9:36 PM, Otis Gospodnetic (JIRA)
<jira@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/MAHOUT-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
>
> Otis Gospodnetic updated MAHOUT-95:
> -----------------------------------
>
>    Attachment: MAHOUT-95.patch
>
> Something like this?
>
> The other patch was a bit more code, but was a bit more "explicit" for both a person
reading and the JVM.  Will the JVM inline those if tests in the now modified estimate(User
user) method?
>
>
>> UserSimilarity-based NearestNNeighborhood
>> -----------------------------------------
>>
>>                 Key: MAHOUT-95
>>                 URL: https://issues.apache.org/jira/browse/MAHOUT-95
>>             Project: Mahout
>>          Issue Type: Improvement
>>          Components: Collaborative Filtering
>>            Reporter: Otis Gospodnetic
>>            Priority: Minor
>>             Fix For: 0.1
>>
>>         Attachments: MAHOUT-95-diff-against-nearestN.txt, MAHOUT-95.patch, MAHOUT-95.patch,
MAHOUT-95.patch, MAHOUT-95.patch
>>
>>
>> A variation of NearestNUserNeighborhood.  This version adds the minSimilarity parameter,
which is the primary factor for including/excluding other users from the target user's neighbourhood.
 Additionally, the 'n' parameter was renamed to maxHoodSize and is used to optionally limit
the size of the neighbourhood.
>> The patch is for a brand new class, but we may really want just a single class (either
keep this one and axe NearestNUserNeighborhood or add this functionality to NearestNUserNeighborhood),
if this sounds good.
>> I'll update the unit test and provide a patch for that if others think this can go
in.
>> Thoughts?
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
View raw message