public class VectorJaccardSimilarity extends VectorSimilarity
data, dense, norm2Array, norm2Map
Constructor and Description |
---|
VectorJaccardSimilarity(FastPreferenceData<?,?> data,
boolean dense)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected double |
sim(double product,
double norm2A,
double norm2B)
Calculates the similarity value.
|
similarElems, similarity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
similarity
public VectorJaccardSimilarity(FastPreferenceData<?,?> data, boolean dense)
data
- preference datadense
- true for array-based calculations, false to map-basedprotected double sim(double product, double norm2A, double norm2B)
VectorSimilarity
sim
in class VectorSimilarity
product
- value of the inner product of vectorsnorm2A
- square of the norm of the first vectornorm2B
- square of the norm of the second vectorCopyright © 2016. All rights reserved.