org.mymedialite
Interface IItemSimilarityProvider

All Known Implementing Classes:
ItemAttributeKNN, ItemAttributeKNN, ItemKNN, ItemKNN, ItemKNNCosine, ItemKNNPearson, WeightedItemAttributeKNN, WeightedItemHierarchicalAttributeKNN, WeightedItemKNN

public interface IItemSimilarityProvider

Interface for classes that provide item similarities.


Method Summary
 float getItemSimilarity(int item_id1, int item_id2)
          Get the similarity between two items.
 int[] getMostSimilarItems(int item_id, int n)
          Get the most similar items.
 

Method Detail

getItemSimilarity

float getItemSimilarity(int item_id1,
                        int item_id2)
Get the similarity between two items.

Parameters:
item_id1 - the ID of the first item
item_id2 - the ID of the second item
Returns:
the item similarity; higher means more similar

getMostSimilarItems

int[] getMostSimilarItems(int item_id,
                          int n)
Get the most similar items.

Parameters:
item_id - the ID of the item
n - the number of similar items to return
Returns:
the items most similar to a given item