edu.qut.cs.rcmd.core.tag.recommender.impl
Class GenericUserBasedTagRecommender
java.lang.Object
edu.qut.cs.rcmd.core.tag.recommender.impl.AbstractTagRecommender
edu.qut.cs.rcmd.core.tag.recommender.impl.GenericUserBasedTagRecommender
- All Implemented Interfaces:
- TagRecommender, UserBasedTagRecommender
public class GenericUserBasedTagRecommender
- extends AbstractTagRecommender
- implements UserBasedTagRecommender
- Author:
- n7374186
Constructor Summary |
GenericUserBasedTagRecommender(org.apache.mahout.cf.taste.model.DataModel dataModel,
TagModel tagModel,
org.apache.mahout.cf.taste.neighborhood.UserNeighborhood neighborhood,
org.apache.mahout.cf.taste.similarity.UserSimilarity similarity)
|
Method Summary |
protected float |
doEstimateTagScore(long theUserID,
long[] theNeighborhood,
long theItemID,
String tag)
|
long[] |
mostSimilarUserIDs(long l,
int i)
|
long[] |
mostSimilarUserIDs(long l,
int i,
org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rscr)
|
List<RecommendedTag> |
recommend(long userID,
long itemID,
int howMany)
|
List<RecommendedTag> |
recommend(long userID,
long itemID,
int howMany,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericUserBasedTagRecommender
public GenericUserBasedTagRecommender(org.apache.mahout.cf.taste.model.DataModel dataModel,
TagModel tagModel,
org.apache.mahout.cf.taste.neighborhood.UserNeighborhood neighborhood,
org.apache.mahout.cf.taste.similarity.UserSimilarity similarity)
recommend
public List<RecommendedTag> recommend(long userID,
long itemID,
int howMany,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
throws org.apache.mahout.cf.taste.common.TasteException
- Specified by:
recommend
in interface TagRecommender
- Overrides:
recommend
in class AbstractTagRecommender
- Parameters:
userID
- user for which recommendations are to be computeditemID
- item for which recommendations are to be computedhowMany
- desired number of recommendationsrescorer
- rescoring function to apply before final list of
recommendations is determined
- Returns:
List
of recommended RecommendedItem
s, ordered
from most strongly recommend to least
- Throws:
org.apache.mahout.cf.taste.common.TasteException
- if an error occurs while accessing the DataModel
mostSimilarUserIDs
public long[] mostSimilarUserIDs(long l,
int i)
throws org.apache.mahout.cf.taste.common.TasteException
- Specified by:
mostSimilarUserIDs
in interface UserBasedTagRecommender
- Parameters:
l
- ID of user for which to find most similar other usersi
- desired number of most similar users to find
- Returns:
- users most similar to the given user
- Throws:
org.apache.mahout.cf.taste.common.TasteException
- if an error occurs while accessing the DataModel
mostSimilarUserIDs
public long[] mostSimilarUserIDs(long l,
int i,
org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rscr)
throws org.apache.mahout.cf.taste.common.TasteException
- Specified by:
mostSimilarUserIDs
in interface UserBasedTagRecommender
- Parameters:
l
- ID of user for which to find most similar other usersi
- desired number of most similar users to findrscr
- Rescorer
which can adjust user-user similarity estimates used to determine most similar
users
- Returns:
- IDs of users most similar to the given user
- Throws:
org.apache.mahout.cf.taste.common.TasteException
- if an error occurs while accessing the DataModel
recommend
public List<RecommendedTag> recommend(long userID,
long itemID,
int howMany)
throws org.apache.mahout.cf.taste.common.TasteException
- Specified by:
recommend
in interface TagRecommender
- Overrides:
recommend
in class AbstractTagRecommender
- Parameters:
userID
- user for which recommendations are to be computeditemID
- item for which recommendations are to be computedhowMany
- desired number of recommendations
- Returns:
List
of recommended RecommendedTag
s, ordered from
most strongly recommend to least
- Throws:
org.apache.mahout.cf.taste.common.TasteException
- if an error occurs while accessing the DataModel
doEstimateTagScore
protected float doEstimateTagScore(long theUserID,
long[] theNeighborhood,
long theItemID,
String tag)
throws org.apache.mahout.cf.taste.common.TasteException
- Throws:
org.apache.mahout.cf.taste.common.TasteException
Copyright © 2012. All Rights Reserved.