public final class JaccardSimilarity extends Object
Constructor and Description |
---|
JaccardSimilarity() |
Modifier and Type | Method and Description |
---|---|
static boolean |
dissimilarityTest(Sketch measured,
Sketch expected,
double threshold)
Tests dissimilarity of a measured Sketch against an expected Sketch.
|
static boolean |
exactlyEqual(Sketch sketchA,
Sketch sketchB)
Returns true if the two given sketches have exactly the same hash values and the same
theta values.
|
static double[] |
jaccard(Sketch sketchA,
Sketch sketchB)
Computes the Jaccard similarity index with upper and lower bounds.
|
static boolean |
similarityTest(Sketch measured,
Sketch expected,
double threshold)
Tests similarity of a measured Sketch against an expected Sketch.
|
public static double[] jaccard(Sketch sketchA, Sketch sketchB)
Note: For very large pairs of sketches, where the configured nominal entries of the sketches are 2^25 or 2^26, this method may produce unpredictable results.
sketchA
- given sketch AsketchB
- given sketch Bpublic static boolean exactlyEqual(Sketch sketchA, Sketch sketchB)
sketchA
- the given sketch AsketchB
- the given sketch Bpublic static boolean similarityTest(Sketch measured, Sketch expected, double threshold)
measured
- the sketch to be testedexpected
- the reference sketch that is considered to be correct.threshold
- a real value between zero and one.public static boolean dissimilarityTest(Sketch measured, Sketch expected, double threshold)
measured
- the sketch to be testedexpected
- the reference sketch that is considered to be correct.threshold
- a real value between zero and one.Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.