org.apache.mahout.cf.taste.impl.recommender
Interface ClusterSimilarity

All Superinterfaces:
Refreshable
All Known Implementing Classes:
FarthestNeighborClusterSimilarity, NearestNeighborClusterSimilarity

public interface ClusterSimilarity
extends Refreshable

Returns the "similarity" between two clusters of users, according to some definition of similarity. Subclassses define different notions of similarity.

See Also:
TreeClusteringRecommender

Method Summary
 double getSimilarity(FastIDSet cluster1, FastIDSet cluster2)
           
 
Methods inherited from interface org.apache.mahout.cf.taste.common.Refreshable
refresh
 

Method Detail

getSimilarity

double getSimilarity(FastIDSet cluster1,
                     FastIDSet cluster2)
                     throws TasteException
Parameters:
cluster1 - first cluster of user IDs
cluster2 - second cluster of user IDs
Returns:
"distance" between clusters; a bigger value means less similarity
Throws:
TasteException - if an error occurs while computing similarity, such as errors accessing an underlying DataModel
java.lang.IllegalArgumentException - if either argument is null or empty


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.