|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planetj.taste.impl.recommender.AbstractRecommender
com.planetj.taste.impl.recommender.GenericUserBasedRecommender
public final class GenericUserBasedRecommender
A simple Recommender which uses a given DataModel and UserNeighborhood
to produce recommendations.
| Constructor Summary | |
|---|---|
GenericUserBasedRecommender(DataModel dataModel,
UserNeighborhood neighborhood,
UserCorrelation correlation)
|
|
| Method Summary | |
|---|---|
double |
estimatePreference(java.lang.Object userID,
java.lang.Object itemID)
|
java.util.List<User> |
mostSimilarUsers(java.lang.Object userID,
int howMany)
|
java.util.List<User> |
mostSimilarUsers(java.lang.Object userID,
int howMany,
Rescorer<Pair<User,User>> rescorer)
|
java.util.List<RecommendedItem> |
recommend(java.lang.Object userID,
int howMany,
Rescorer<Item> rescorer)
|
void |
refresh()
Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that
any |
java.lang.String |
toString()
|
| Methods inherited from class com.planetj.taste.impl.recommender.AbstractRecommender |
|---|
getAllOtherItems, getDataModel, recommend, removePreference, setPreference |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.planetj.taste.recommender.Recommender |
|---|
getDataModel, recommend, removePreference, setPreference |
| Constructor Detail |
|---|
public GenericUserBasedRecommender(DataModel dataModel,
UserNeighborhood neighborhood,
UserCorrelation correlation)
| Method Detail |
|---|
@NotNull
public java.util.List<RecommendedItem> recommend(java.lang.Object userID,
int howMany,
Rescorer<Item> rescorer)
throws TasteException
recommend in interface RecommenderuserID - user for which recommendations are to be computedhowMany - desired number of recommendationsrescorer - rescoring function to apply before final list of recommendations is determined
List of recommended RecommendedItems, ordered from most strongly
recommend to least
TasteException - if an error occurs while accessing the DataModel
public double estimatePreference(java.lang.Object userID,
java.lang.Object itemID)
throws TasteException
estimatePreference in interface RecommenderuserID - user ID whose preference is to be estimateditemID - item ID to estimate preference for
Double.NaN
TasteException - if an error occurs while accessing the DataModel
@NotNull
public java.util.List<User> mostSimilarUsers(java.lang.Object userID,
int howMany)
throws TasteException
mostSimilarUsers in interface UserBasedRecommenderuserID - ID of User for which to find most similar other UsershowMany - desired number of most similar Users to find
Users most similar to the given user
TasteException - if an error occurs while accessing the DataModel
@NotNull
public java.util.List<User> mostSimilarUsers(java.lang.Object userID,
int howMany,
Rescorer<Pair<User,User>> rescorer)
throws TasteException
mostSimilarUsers in interface UserBasedRecommenderuserID - ID of User for which to find most similar other UsershowMany - desired number of most similar Users to findrescorer - Rescorer which can adjust user-user correlation
estimates used to determine most similar users
Users most similar to the given user
TasteException - if an error occurs while accessing the DataModelpublic void refresh()
Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that
any Refreshable should always leave itself in a consistent, operational state, and that
the refresh atomically updates internal state from old to new.
refresh in interface Refreshablerefresh in class AbstractRecommender@NotNull public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||