[
https://issues.apache.org/jira/browse/MAHOUT-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662139#action_12662139
]
otis edited comment on MAHOUT-95 at 1/8/09 2:15 PM:
----------------------------------------------------------------
I just had a look at the code and your suggestion after a pause. Yes, that
would work...
But how about this:
I want to ignore users whose theUser-user similarity is < N.
But I can't do that with the current API if I provide my implementation of
Rescorer<*User*> -- I can only pass in Rescorer<*Item*> rescorers. I tried
adding the API that takes Rescorer<User>, but quickly found myself doing
surgery on a number of classes (Recommender, TopItems, NearestNUserNeighborhood
and maybe more), so I cowardly backed out...
Maybe I'm missing the right way to add support for passing in an instance of
Rescorer<User>?
Note that I could still create something like:
{code}
public class MinItemSimilarityRescorer<T> implements Rescorer<Item> {
private double minSimilarity;
public MinItemSimilarityRescorer(double minSimilarity) {
this.minSimilarity = minSimilarity;
}
public boolean isFiltered(Item thing) {
return false;
}
// IGNORE Item and make this type-agnostic
public double rescore(Item thing, double originalScore) {
return (originalScore < minSimilarity) ? Double.NaN : originalScore;
}
}
{code}
And have this Rescorer never even look at the <T>, thus making it
type-agnostic.... but it feels wrong to have <Item> there if the scores I'm
really looking at are user-user similarity scores.
To put this in context, this rescorer gets called in TopItems.getTopUsers, so
that's what I'm looking at:
{code}
double similarity = estimator.estimate(user);
double rescoredSimilarity = rescorer == null ? similarity :
rescorer.rescore(user, similarity);
{code}
was (Author: otis):
I just had a look at the code and your suggestion after a pause. Yes, that
would work...
But how about this:
I want to ignore users whose theUser-user similarity is < N.
But I can't do that with the current API if I provide my implementation of
Rescorer<User> -- I can only pass in Rescorer<Item> rescorers. I tried adding
the API that takes Rescorer<User>, but quickly found myself doing surgery on a
number of classes (Recommender, TopItems, NearestNUserNeighborhood and maybe
more), so I cowardly backed out...
Maybe I'm missing the right way to add support for passing in an instance of
Rescorer<User>?
> 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
> Attachments: MAHOUT-95-diff-against-nearestN.txt, 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.