|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ItemSimilarity
Implementations of this interface define a notion of similarity between two items. Implementations should return values in the range -1.0 to 1.0, with 1.0 representing perfect similarity.
UserSimilarity
Method Summary | |
---|---|
long[] |
allSimilarItemIDs(long itemID)
|
double[] |
itemSimilarities(long itemID1,
long[] itemID2s)
A bulk-get version of itemSimilarity(long, long) . |
double |
itemSimilarity(long itemID1,
long itemID2)
Returns the degree of similarity, of two items, based on the preferences that users have expressed for the items. |
Methods inherited from interface org.apache.mahout.cf.taste.common.Refreshable |
---|
refresh |
Method Detail |
---|
double itemSimilarity(long itemID1, long itemID2) throws TasteException
Returns the degree of similarity, of two items, based on the preferences that users have expressed for the items.
itemID1
- first item IDitemID2
- second item ID
Double.NaN
similarity is unknown
NoSuchItemException
- if either item is known to be non-existent in the data
TasteException
- if an error occurs while accessing the datadouble[] itemSimilarities(long itemID1, long[] itemID2s) throws TasteException
A bulk-get version of itemSimilarity(long, long)
.
itemID1
- first item IDitemID2s
- second item IDs to compute similarity with
NoSuchItemException
- if any item is known to be non-existent in the data
TasteException
- if an error occurs while accessing the datalong[] allSimilarItemIDs(long itemID) throws TasteException
TasteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |