|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.cf.taste.impl.recommender.FarthestNeighborClusterSimilarity
public final class FarthestNeighborClusterSimilarity
Defines cluster similarity as the smallest similarity between any two users in the clusters -- that is, it says that clusters are close when all pairs of their members have relatively high similarity.
Constructor Summary | |
---|---|
FarthestNeighborClusterSimilarity(UserSimilarity similarity)
Constructs a based on the given UserSimilarity . |
|
FarthestNeighborClusterSimilarity(UserSimilarity similarity,
double samplingRate)
Constructs a based on the given UserSimilarity . |
Method Summary | |
---|---|
double |
getSimilarity(FastIDSet cluster1,
FastIDSet cluster2)
|
void |
refresh(Collection<Refreshable> alreadyRefreshed)
Triggers "refresh" -- whatever that means -- of the implementation. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FarthestNeighborClusterSimilarity(UserSimilarity similarity)
Constructs a based on the given UserSimilarity
. All
user-user similarities are examined.
public FarthestNeighborClusterSimilarity(UserSimilarity similarity, double samplingRate)
Constructs a based on the given UserSimilarity
. By
setting samplingRate
to a value less than 1.0, this implementation will only examine that
fraction of all user-user similarities between two clusters, increasing performance at the expense of
accuracy.
Method Detail |
---|
public double getSimilarity(FastIDSet cluster1, FastIDSet cluster2) throws TasteException
getSimilarity
in interface ClusterSimilarity
cluster1
- first cluster of user IDscluster2
- second cluster of user IDs
TasteException
- if an error occurs while computing similarity, such as errors accessing an underlying
DataModel
public void refresh(Collection<Refreshable> alreadyRefreshed)
Refreshable
Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that any should always leave itself in a consistent, operational state, and that the refresh atomically updates internal state from old to new.
refresh
in interface Refreshable
alreadyRefreshed
- s that are known to have already been
refreshed as a result of an initial call to a method on some
object. This ensure that objects in a refresh dependency graph aren't refreshed twice
needlessly.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |