org.mymedialite
Interface IUserSimilarityProvider

All Known Implementing Classes:
UserAttributeKNN, UserAttributeKNN, UserKNN, UserKNN, UserKNNCosine, UserKNNPearson, WeightedUserKNN

public interface IUserSimilarityProvider

Interface for classes that provide user similarities.


Method Summary
 int[] getMostSimilarUsers(int user_id, int n)
          get the most similar users.
 float getUserSimilarity(int user_id1, int user_id2)
          get the similarity between two users.
 

Method Detail

getUserSimilarity

float getUserSimilarity(int user_id1,
                        int user_id2)
get the similarity between two users.

Parameters:
user_id1 - the ID of the first user
user_id2 - the ID of the second user
Returns:
the user similarity; higher means more similar

getMostSimilarUsers

int[] getMostSimilarUsers(int user_id,
                          int n)
get the most similar users.

Parameters:
user_id - the ID of the user
n - the number of similar users to return
Returns:
the users most similar to a given user