public class SetCosineSimilarity extends SetSimilarity
data, dense| Constructor and Description |
|---|
SetCosineSimilarity(FastPreferenceData<?,?> data,
double alpha,
boolean dense)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
sim(int intersectionSize,
int nA,
int nB)
Calculates the similarity value.
|
similarElems, similarityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsimilaritypublic SetCosineSimilarity(FastPreferenceData<?,?> data, double alpha, boolean dense)
data - preference dataalpha - asymmetry of the similarity, set to 0.5 for standard cosinedense - true for array-based calculations, false to map-basedprotected double sim(int intersectionSize,
int nA,
int nB)
SetSimilaritysim in class SetSimilarityintersectionSize - size of the intersection of setsnA - size of the first setnB - size of the second setCopyright © 2016. All rights reserved.