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
getSimilarity
double getSimilarity(FastIDSet cluster1,
FastIDSet cluster2)
throws TasteException
- Parameters:
cluster1
- first cluster of user IDscluster2
- 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
IllegalArgumentException
- if either argument is null or empty
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.