com.planetj.taste.correlation
Interface UserCorrelation

All Superinterfaces:
Refreshable
All Known Implementing Classes:
PearsonCorrelation, SpearmanCorrelation

public interface UserCorrelation
extends Refreshable

Implementations of this interface define a notion of itemCorrelation between two Users. Implementations should return values in the range -1.0 to 1.0, with 1.0 representing perfect correlation.

Author:
Sean Owen
See Also:
ItemCorrelation

Method Summary
 void setPreferenceInferrer(PreferenceInferrer inferrer)
          Attaches a PreferenceInferrer to the UserCorrelation implementation.
 double userCorrelation(User user1, User user2)
          Returns the "itemCorrelation", or degree of similarity, of two Users, based on the their preferences.
 
Methods inherited from interface com.planetj.taste.common.Refreshable
refresh
 

Method Detail

userCorrelation

double userCorrelation(User user1,
                       User user2)
                       throws TasteException

Returns the "itemCorrelation", or degree of similarity, of two Users, based on the their preferences.

Parameters:
user1 - first user
user2 - second user
Returns:
itemCorrelation between the two users
Throws:
TasteException - if an error occurs while accessing the data

setPreferenceInferrer

void setPreferenceInferrer(PreferenceInferrer inferrer)

Attaches a PreferenceInferrer to the UserCorrelation implementation.

Parameters:
inferrer - PreferenceInferrer