|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planetj.taste.impl.recommender.NearestNeighborClusterSimilarity
public final class NearestNeighborClusterSimilarity
Defines cluster similarity as the largest correlation between any two
Users in the clusters -- that is, it says that clusters are close
when some pair of their members has high correlation.
| Constructor Summary | |
|---|---|
NearestNeighborClusterSimilarity(UserCorrelation correlation)
Constructs a NearestNeighborClusterSimilarity based on the given UserCorrelation. |
|
NearestNeighborClusterSimilarity(UserCorrelation correlation,
double samplingPercentage)
Constructs a NearestNeighborClusterSimilarity based on the given UserCorrelation. |
|
| Method Summary | |
|---|---|
double |
getSimilarity(java.util.Collection<User> cluster1,
java.util.Collection<User> cluster2)
|
void |
refresh()
Triggers "refresh" -- whatever that means -- of the implementation. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NearestNeighborClusterSimilarity(UserCorrelation correlation)
Constructs a NearestNeighborClusterSimilarity based on the given UserCorrelation.
All user-user correlations are examined.
correlation -
public NearestNeighborClusterSimilarity(UserCorrelation correlation,
double samplingPercentage)
Constructs a NearestNeighborClusterSimilarity based on the given UserCorrelation.
By setting samplingPercentage to a value less than 1.0, this implementation will only examine
that fraction of all user-user correlations between two clusters, increasing performance at the expense
of accuracy.
correlation - samplingPercentage - | Method Detail |
|---|
public double getSimilarity(java.util.Collection<User> cluster1,
java.util.Collection<User> cluster2)
throws TasteException
getSimilarity in interface ClusterSimilaritycluster1 - first cluster of Userscluster2 - second cluste rof Users
TasteException - if an error occurs while computing similarity, such as
errors accessing an underlying DataModelpublic void refresh()
Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that
any Refreshable 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@NotNull public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||