|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserSimilarity
Implementations of this interface define a notion of similarity between two users. Implementations should return values in the range -1.0 to 1.0, with 1.0 representing perfect similarity.
ItemSimilarity
Method Summary | |
---|---|
void |
setPreferenceInferrer(PreferenceInferrer inferrer)
Attaches a PreferenceInferrer to the UserSimilarity implementation. |
double |
userSimilarity(long userID1,
long userID2)
Returns the degree of similarity, of two users, based on the their preferences. |
Methods inherited from interface org.apache.mahout.cf.taste.common.Refreshable |
---|
refresh |
Method Detail |
---|
double userSimilarity(long userID1, long userID2) throws TasteException
Returns the degree of similarity, of two users, based on the their preferences.
userID1
- first user IDuserID2
- second user ID
Double.NaN
similarity is unknown
NoSuchUserException
- if either user is known to be non-existent in the data
TasteException
- if an error occurs while accessing the datavoid setPreferenceInferrer(PreferenceInferrer inferrer)
Attaches a PreferenceInferrer
to the UserSimilarity
implementation.
inferrer
- PreferenceInferrer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |